Why does the order of elements in a Boolean expression change the outcome? : <p>If x is 0, 0 is printed. If y is 0, we get an error.</p>

<p>Why is this? The only thing I can think of is that the order in which the Boolean expression is compiled matters. If x is 0 then we get (false)&amp;&amp;(error value) where false is on the left side, and if y is 0 then we get (error value)&amp;&amp;(false). Why does this effect what is printed?</p>

<pre><code>int main(void) {
  int x = 1;
  int y = 0;
  int a = (x/y &gt; 0)&amp;&amp;(y/x &gt; 0);
  printf("%d\n", a);
  return 0;
}
</code></pre>
