title: Why is "if (i++ && (i == 1))" false where i is an int holding the value 1?
body: <pre><code>{
      int i = 1;
      if (i++ &amp;&amp; (i == 1))
          printf("Yes\n");
      else
          printf("No\n");
  }
  </code></pre>
  
  <p>As per my understanding, in the <code>if</code> condition, first the expression (<code>i==1</code>) will be evaluated which should return <code>1</code>, and then it is logically anded with <code>1</code> which is the value of <code>i</code>, so the expression should return <code>1 &amp;&amp; 1 == 1</code>, but the <code>else</code> part is executed. </p>
  
  <p>Can someone please explain why the <code>else</code> part is executed?</p>