The priority and associativity of the operators do not tell you what happens before and what happens after. The priority / associativity of operators has nothing to do with this. In C, temporal relationships such as "before" or "after" are defined by so-called sequence points and only sequence points (and this is a completely separate story).
Operator precedence / associativity simply tells you which operands belong to which operators. For example, the expression a = b++ can be formally interpreted as (a = b)++ and as a = (b++) . The precedence / associativity of the operators in this case simply tells you that the last interpretation is correct, and the first is incorrect (i.e. ++ is applied to b , and not to the result a = b ).
This again does not mean that b should be increased first. The priority / associativity of the operators, again, relates to what happens "first" and what happens "next." It just tells you that the result of the b++ expression is assigned to a . By definition, the result of b++ (postfix increment) is the original value of b . This is why a will get the original value of b , which is 1. When the variable b increases, it will be completely irrelevant until a gets the assigned b original value. The compiler is allowed to evaluate this expression in any order and increment b at any time: everything goes while a somehow gets the original value of b (and no one really cares about how this "somehow" works inside).
For example, the compiler may evaluate a = b++ as the following sequence of elementary operations
(1) a := b (2) b := b + 1
or he can evaluate it as follows
(1) b := b + 1 (2) a = b - 1
Note that in the first case, b actually increases at the end, while in the second case, b increases in the first order. But in both cases, a receives the same correct value - the original value of b , which is how it should turn out.
But I must repeat that the above two examples are given here for illustrative purposes only. In fact, expressions like a = ++b and a = b++ do not have sequence points inside, which means that from your point of view, everything in these expressions happens simultaneously. There is no “before,” “after,” “first,” “next,” or “last.” Such expressions are “atomic” in a sense that they cannot be meaningfully decomposed into a sequence of smaller steps.