The evaluation order of the arguments in the function call is not specified. The compiler can evaluate them depending on what order it can decide.
From the standard C99 6.5.2.2/10 "Functional Calls / Semantics":
The order of evaluation of the function pointer, the actual arguments and the subexpressions in the actual arguments are not defined, but there is a sequence point before the actual call.
If you need to provide a specific order, using time series is the usual workaround:
int i;
for(i=0;i<5;i++) {
int tmp = i;
int tmp2 = i++;
res(tmp2,tmp);
}
( undefined, ), , increment/decment . , :
. , , . (6.5/2 "" )