Hi,

I am returning to C programs after a long time and i have confusion why 3rd output is 31! Remembering concepts of precedence and association i think i am either overlooking something or it may be undefined behavior. But i am 70% sure that it may not be come under criteria of undefined behavior and this is why posting it here to understand it.

Code:
If p = 10 then
(++p) + p + p = 33
p + (++p) + p = 33
p + p + (++p) = 31
p + p * (++p) = 132