title: Post-increment on a dereferenced pointer?
body: <p>Trying to understand the behaviour of pointers in C, I was a little surprised by the following (example code below):</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  void add_one_v1(int *our_var_ptr)
  {
      *our_var_ptr = *our_var_ptr +1;
  }
  
  void add_one_v2(int *our_var_ptr)
  {
      *our_var_ptr++;
  }
  
  int main()
  {
      int testvar;
  
      testvar = 63;
      add_one_v1(&amp;(testvar));         /* Try first version of the function */
      printf("%d\n", testvar);        /* Prints out 64                     */
      printf("@ %p\n\n", &amp;(testvar));
  
      testvar = 63;
      add_one_v2(&amp;(testvar));         /* Try first version of the function */
      printf("%d\n", testvar);        /* Prints 63 ?                       */
      printf("@ %p\n", &amp;(testvar));   /* Address remains identical         */
  }
  </code></pre>
  
  <p>Output:</p>
  
  <pre class="lang-none prettyprint-override"><code>64
  @ 0xbf84c6b0
  
  63
  @ 0xbf84c6b0
  </code></pre>
  
  <p>What exactly does the <code>*our_var_ptr++</code> statement in the second function (<code>add_one_v2</code>) do since it's clearly not the same as <code>*our_var_ptr = *our_var_ptr +1</code>?</p>