0
The standard language C does not establish the order of evaluation of the parameters of a function. Therefore, according to the standard of the language its code has undefined behavior. The order of evaluation will depend on each compiler.
In this case, it is clear that the compiler has chosen the a++
will be evaluated before the a
.
Since the C language does not give you any guarantee about who will be evaluated first in this type of situation, I advise avoiding this kind of thing in a professional code.
Expected side effect. Search by Quence point at http://www.faqs.org/faqs/C-faq/faq/.
– anonimo
not to use this type of code, as stated in the answer below is indefnida the order of evaluation of the parameters for a function
– zentrunix