title: How does printf give priority in GCC
body: <p>Here is a code:</p>
  
  <pre><code>#include&lt;stdio.h&gt;
  
  int main() {
      int i=0;
      printf("%d %d %d", i, i++, ++i);
      return 0;
  }
  </code></pre>
  
  <p>The output to the code is </p>
  
  <pre><code>2 1 2
  </code></pre>
  
  <p>But, if the code is evaluated right to left then it should be</p>
  
  <pre><code>2 1 1
  </code></pre>
  
  <p>Please explain how GCC is evaluating.</p>
  
  <p>Thank you.</p>