title: Post-increment vs Assignment in C++ operation precedence table
body: <p>I stumbled upon <a href="https://en.cppreference.com/w/cpp/language/operator_precedence" rel="nofollow noreferrer">https://en.cppreference.com/w/cpp/language/operator_precedence</a></p>
  
  <p>On the chart, I see that post-increment operator (++) is way above assignment operator (=).</p>
  
  <p><a href="https://i.stack.imgur.com/u3q2E.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/u3q2E.png" alt="enter image description here"></a></p>
  
  <p>However, I know that</p>
  
  <pre><code>int a[] = {10,20};
  int* b = &amp;a[0];
  
  *(b++) = 5;
  
  cout &lt;&lt; a[0] &lt;&lt; endl; // 5
  cout &lt;&lt; a[1] &lt;&lt; endl; // 20
  cout &lt;&lt; *b &lt;&lt; endl; // 20, now points to a[1]
  </code></pre>
  
  <p>I always take it for grant that post-increment happens after the assignment operator. However, if I follow the operation precedence chart, then isn't post-increment suppose to happen before <code>=</code> operation? Isn't the answer suppose to be <code>a={10, 5}</code> rather than <code>a={5, 20}</code>?</p>