Originally Posted by
robatino
If I'm not mistaken, each of the *p--'s is generating a bad pointer by decrementing p, then dereferencing the result, either of which generates undefined behavior. So there is no 100% correct answer (though if you assume that *p-- is equivalent to a noop, then it's 100).
It's postfix decrement, so it decrements after the dereference. This is a funny example because although the decrement binds first, its operation happens second.
You typically see this kind of thing in loops which copy data (usually with increment, not decrement):
Code:
type *src, *dst, *end;
...
while(src < end)
*dst++ = *src++;