What does *++x mean when x is a pointer to an int?
Are *(x++) and *(++x) the same?
Printable View
What does *++x mean when x is a pointer to an int?
Are *(x++) and *(++x) the same?
*(x++) will increment x (make it point to the next integer in line) after dereferencing, while *(++x) will increment x before.
So the parentheses don't do anything?
You mean between *(x++) and *x++? Those are the same. The parentheses are redundant in *++x, since there's no way to interpret that other than pre-increment x, then dereference.
I mean between *(x++) and *(++x).