title: A weird behavior of C compilers GCC and Turbo
body: <p>I've gone through other similar questions, but trying to understand the situation I'm facing.</p>
  
  <p>So, here's my two line C code.</p>
  
  <pre><code>int i=0;
  printf("%d %d %d %d %d",i++,i--,++i,--i,i);
  </code></pre>
  
  <p>And here are the outputs I get from GCC and Turbo C Compiler.</p>
  
  <h2>GCC</h2>
  
  <p>Output:</p>
  
  <pre><code>-1 0 0 0 0
  </code></pre>
  
  <h2>Turbo C</h2>
  
  <p>Output:</p>
  
  <pre><code>-1 0 0 -1 0
  </code></pre>
  
  <p>I tried all sorts of experiments with pre-increment operator individually, and both compilers work similar but when I use above <code>printf</code> statement, output differs.</p>
  
  <p>I know that Turbo C is age-old compiler and now obsolete and non-standard but still can't get an idea what's wrong with above code.</p>