title: Pointer expressions: *ptr++, *++ptr and ++*ptr
body: <p>Recently I have come across this problem which I am unable to understand by myself.</p>
  <p>What do these three Expressions <strong>REALLY</strong> mean?</p>
  <pre><code>*ptr++
  *++ptr
  ++*ptr
  </code></pre>
  <p>I have tried Ritchie. But unfortunately was unable to follow what he told about these 3 operations.</p>
  <p>I know they are all performed to increment the pointer/the value pointed to. I can also guess there may be a lot of things about precedence and order of evaluation. Like one increments the pointer first then fetches the content of that pointer, one simply fetches the content and then increments the pointer etc etc. As you can see, I don't have a clear understanding about their <strong>actual</strong> operations, which i would like to clear as soon as possible. But I am truly lost when I get a chance to apply them in programs. For example:</p>
  <pre><code>int main()
  {
      char *p = &quot;Hello&quot;;
      while(*p++)
           printf(&quot;%c&quot;,*p);
      return 0;
  }
  </code></pre>
  <p>gives me this output:</p>
  <pre><code>ello
  </code></pre>
  <p>But my expectation was that it would print <code>Hello</code> .
  One final request -- Please give me examples for how each expression works in a given code snippet. As most of the time only a mere paragraph of theory gets flown over my head.</p>