title: How are if statements with complex conditions treated in C?
body: <p>Consider the following (somewhat nonsensical) if statement:</p>
  
  <pre><code>int i = 0;
  int j = 0;
  
  //get i, j from the user, or a file, or something
  
  if(i &lt; 6 &amp;&amp; j &gt; 4)
  ...
  else if(j &gt; 6)
  ...
  </code></pre>
  
  <p>Now, does this compile into something like the following:</p>
  
  <ul>
  <li>compare i &lt; 6, branch to the <code>else if</code> if not</li>
  <li>compare j > 4, branch to the <code>else if</code> if not</li>
  <li><code>else if</code>: compare j > 6 (even though this couldn't be true if the second comparison above were false)</li>
  </ul>
  
  <p>or is there some intelligent way of predicting things that simplifies the logic?</p>