title: multiple condition not correctly evaluated
body: <p>Hi I'm new in this forum.
  I have a problem with a function c that should verify the correctness of the structure of an isbn code so formatted "3 numbers one dash and ten numbers (ex: 111-1111111111).
  The function should return 1 if the code is correct 0 otherwise, unfortunately it always returns 0 even if the code is correct.
  I attach my code.</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;ctype.h&gt;
  
  
  int checkIsbn(char isbn[]);
  
  int main(int argc, char const *argv[])
  {
  
      char v[] = "111-1111111111";
  
      printf("%d",checkIsbn(v));
  
  
      return 0;
  }
  
  int checkIsbn(char isbn[]){
  
      int ret = 0;//return value
  
          //I check the individual characters
          if((isdigit(isbn[0]) != 0) &amp;&amp; (isdigit(isbn[1]) != 0) &amp;&amp; (isdigit(isbn[2]) != 0) &amp;&amp;
            (isbn[3] == '-') &amp;&amp; (isdigit(isbn[3]) != 0) &amp;&amp;
            (isdigit(isbn[5]) != 0) &amp;&amp; (isdigit(isbn[6]) != 0) &amp;&amp; (isdigit(isbn[7]) != 0) &amp;&amp;
            (isdigit(isbn[8]) != 0)&amp;&amp; (isdigit(isbn[9]) != 0) &amp;&amp; (isdigit(isbn[10]) != 0) &amp;&amp;
            (isdigit(isbn[11]) != 0) &amp;&amp; (isdigit(isbn[12]) != 0) &amp;&amp; (isdigit(isbn[13] != 0))){//the characters respect the structure
  
              ret = 1;
  
          }
  
      return ret;
  }
  </code></pre>
  
  <p>thank you in advance</p>