A more detailed explanation is that with ++p, the value of p is incremented BEFORE the expression it is part of. with p++, the value of p is incremented AFTER the expression it is part of. With both of them, the value of p is the same both before and after the expression has been evaluated.