Do not think about assosiativity. Think about order of evaluation and unfortunately it is undefined in this case.
In the expression
int b=a*i + ++i;
you are modifying i
as well as using it in the same expression which invokes undefined behavior.
C99 states that:
Between the previous and next sequence point an object shall have its stored value modified at most once by the evaluation of an expression. Furthermore, the prior value shall be accessed only to determine the value to be stored.
Further I would suggest you to read c-faq: Q 3.8.