I made a silly mistake of doing *p++; thinking that p would be dereferenced first and then the value pointed by p would get incremented. So I found that this is more akin to:
*(p++);
Because the postfix ++ increment operator has higher precedence than the * dereference operator.
But now that I'm thinking in terms of operator precedence, I find that postfix++ is higher than for example the equality == operator, but in:
int a = 0;
if (0 == a++) // Condition is true
And the same goes for ! logical NOT:
int a = 0;
if (!a++) // Condition is true, a is incremented after the condition check
// even if it's higher precedence than !
So there must be more to it from what I've seen.
I've heard about the right-to-left and clockwise/spiral rule, but every time I've tried to grasp it it escaped my understanding.
I don't want a full explanation on the evaluation order, as I can struggle through that with my own reading. But am I at least right that it's not just a matter of operator precedence? For example the answer that *p++ is evaluated the way it is because the postfix++ operator is of higher precedence is only half right or part of the answer?