Problem in incrementing
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/949433/could-anyone-explain-these-undefined-behaviors-i-i-i-i-i-etc">Could anyone explain these undefined behaviors (i = i++ + ++i , i = i++, etc…)</a>  </p>
</blockquote>



<p>I have a variable declared like this:</p>

<pre><code>int j=0;
</code></pre>

<p>When I write:</p>

<pre><code>cout&lt;&lt;j++&lt;&lt;" "&lt;&lt;j++&lt;&lt;" "&lt;&lt;j++&lt;&lt;"\n";
</code></pre>

<p>I receive this output:</p>

<pre><code>2 1 0
</code></pre>

<p>I expect to receive this output:</p>

<pre><code>0 1 2 
</code></pre>

<p>Could you explain the result?</p>
