I would guess that the result in C was dependent on how closely the compiler follows operator precedence/binding.

The postfix increment operator “++” is at the top of the precedence chart where direct assignment “=” is almost at the bottom.

Wouldn’t CPP turn it into:

k = (k++)

and not:

k = k;
k++;

??

Then I found this:

“Postfix increment/decrement have high precedence, but the actual increment or decrement of the operand is delayed (to be accomplished sometime before the statement completes execution). So in the statement y = x * z++; the current value of z is used to evaluate the expression (i.e., z++ evaluates to z) and z only incremented after all else is done.”

I couldn’t locate a copy of the ANSI C standard in the 5 min. I spent looking…