title: What is the difference between these code snippets?
body: <p>I have the following code snippet running great:</p>
  
  <pre><code>char* head = str;
  char* tail = head;
  while ( *tail ) {
      ++tail;
  }
  </code></pre>
  
  <p>I changed the while loop for simplification and the new code is</p>
  
  <pre><code>char* head = str;
  char* tail = head;
  while ( *tail++ );
  </code></pre>
  
  <p>I believe the above 2 code snippets work same. But the 2nd one does! In GDB I see that, for a string with 32 characters, pointer tail is 33 larger than head which should be 31. </p>
  
  <p>I am really baffled.</p>