title: Post increment and Pre increment in C
body: <p>I have a question about these two C statements:</p>
  
  <ol>
  <li><p><code>x = y++;</code></p></li>
  <li><p><code>t = *ptr++;</code></p></li>
  </ol>
  
  <p>With statement 1, the initial value of y is copied into x then y is incremented.  </p>
  
  <p>With statement 2, We look into the value pointed at by *ptr, putting that into variable t, then sometime later increment ptr.</p>
  
  <p>For statement 1, the suffix increment operator has higher precedence than the assignment operator.  So shouldn't y be incremented first and then x is assigned to the incremented value of y?</p>
  
  <p>I'm not understanding operator precedence in these situations.</p>