In general, but you did not specify a compiler, compilation flags, and in general a language - the correct answer is one: "undefined behavior".
The increments / decrements themselves are usually calculated in the first place (although only usually, a particular standard of a particular language may have a different opinion), but in what order among themselves is the question.
For example, the expression
--a + a * ++a
It can be done in the order: --a, ++ a, *, +. Maybe ++ a, *, +, --a, maybe ++ a, --a, *, +. The results, of course, will be different. But all at the same time true. Which option will be used depends on:
- the standard of the language used, there may explicitly specify the order of evaluation of the operands
- specific compiler
- specific version of the compiler
- and even specific compilation flags
- Well, if not from the phase of the moon and the temperature on Mars, i.e. at least on a specific compiler is reproduced from assembly to assembly
It is called indefinite behavior. For such a code, it is very painful to beat hands, but it is not uncommon at all interviews.