Hello all,

This is probably a trivially easy question, but here goes anyway:

How or why do C compilers know that the expression a+++b evaluates as (a++)+ b?

In the expression a+(++b), the prefix increment operator has a higher precedence than the binary + operator, which suggests to me that the parentheses are unnecessary and that a+(++b) too could be rewritten as a+++b. Also, associativity would appear to me to be irrelevant here, since we are dealing with operators of different precedence, which in itself should determine the sequence in which the operations are carried out.

Clearly I am missing something here but I have no idea what. I have been right through K&R and can't find any help there.

Sorry if this seems like a stupid question; I have only been learning C for a few weeks.