Skip to content
Sumedh

What does *p++ do?

The postfix "++" operator has higher precedence than prefix " * " operator. Thus, *p++ is same as *(p++); it increments the pointer p, and returns the value which p pointed to before p was incremented. If you want to increment the value pointed to by p, try (*p)++.