title: Comparison of int values in an if statement
body: <p>I had a question in my test paper in which we had to compare the values of int type variables. The first thought that came to my mind was that it was missing the &amp;&amp; operator but i am not sure.</p>
  
  <pre><code>int a=2, b=2, c=2;
  if(a==b==c)
  {
      printf("hello");
  }
  </code></pre>
  
  <p>I have a doubt, will the above statement will execute or not in c or c++? Can i have the reason as well.
  Thank You</p>