title: How the given C code be interpretated by different Compiler
body: <p>I have a code below and wanted to know what could be output.What i would like to see how different compiler would interpret this particular piece of code.</p>
  <pre><code>int main()
  {
  int i = -1, j = 2, k = 0, m;
  m = ++i || ++j &amp;&amp; ++k;
  printf(&quot;\n %d %d %d %d \n&quot;, i, j, k, m);
  return 0;
  }
  </code></pre>
  <p>Now the question is while handling this code would compiler go by the rule which says</p>
  <blockquote>
  <p>This expresion can be seen as</p>
  <pre><code> m = ++i || (++j &amp;&amp; ++k); 
  </code></pre>
  <p>as &amp;&amp; has higher precedence over || and the result would     be 0 2 0 1</p>
  </blockquote>
  <p>or</p>
  <blockquote>
  <p>This expresion can be seen as</p>
  <pre><code>m = ++i || (++j &amp;&amp; ++k);
  </code></pre>
  <p>but compiler still will try to short circuit. so it evaluates ++i, since it's 1,(++j&amp;&amp;++k) &gt;are not evaluated.so ans is 0 3 1 1</p>
  </blockquote>