Operator precedence in the given expressions

Viewed 1821

Expression 1: *p++; where p is a pointer to integer.

p will be incremented first and then the value to which it is pointing to is taken due to associativity(right to left). Is it right?

Expression 2: a=*p++; where p is a pointer to integer.

Value of p is taken first and then assigned to a first then p is incremented due to post increment. Is it right?

6 Answers
Related