You're engaging in undefined behavior due to sequence points. If you're being taught this, your instructor is an idiot.

04-07-2011

Clairvoyant1332

It is undefined what order the parameters of a function are evaluated in. In practice, many compilers will do them in the reverse order because that's how they get pushed on the stack, but don't depend on that.

It is undefined what order the parameters of a function are evaluated in. In practice, many compilers will do them in the reverse order because that's how they get pushed on the stack, but don't depend on that.