C++ assignment operator associativity
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/4176328/undefined-behavior-and-sequence-points">Undefined Behavior and Sequence Points</a>  </p>
</blockquote>



<p>after the following  c++ code, the array a contains: 0, 1, 2, 3, 4</p>

<pre><code>int a[5] = {0,1,2,3,4};
int i = 2;
a[i++] = a[i++];
</code></pre>

<p>i expected it to be: 0, 1, 3, 3, 4</p>

<p>could anyone explain me why?</p>
