title: "&&" and "and" operator in C
body: <p>I am trying to calculate the Greatest Common Denominator of two integers.</p>
  
  <p>C Code:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int gcd(int x, int y);
  
  int main()
  {
      int m,n,temp;
      printf("Enter two integers: \n");
      scanf("%d%d",&amp;m,&amp;n);
      printf("GCD of %d &amp; %d is = %d",m,n,gcd(m,n));
      return 0;  
  }
  
  int gcd(int x, int y)
  {
      int i,j,temp1,temp2;
  
      for(i =1; i &lt;= (x&lt;y ? x:y); i++)
      {
          temp1 = x%i;
          temp2 = y%i;
          if(temp1 ==0 and temp2 == 0)
              j = i;
      } 
      return j;         
  }
  </code></pre>
  
  <p>In the if statement, note the logical operator.  It is <code>and</code> not <code>&amp;&amp;</code> (by mistake). The code works without any warning or error. </p>
  
  <p>Is there an <code>and</code> operator in C?  I am using  <strong>orwellDev-C++</strong> 5.4.2 (in <strong>c99</strong> mode).</p>