The critical thing to remember is do not use a variable more than once in an expression if one (or more) of the references has one of ++ or -- operators attached to it. The standard does not specify the order in which the operands of an operator are evaluated and there is no guarantee when an affected variable will change its value.
in the case of
it is not critical, the ++a operands will be evaluated before the + operator so the result will be a=10 and b=20
consider
the + operator associates from left to right so it evaluated
however, when are the ++a operands evaluated?
1. the ++a operands of (++a + ++a) evaluated and the result added then the final ++a evaluated and added? the result is a=11 and b=31
2. all the ++a operands evaluated and the then the + operations executed giving a=11 and b= 33