The evaluation order of function parameters is unspecified, and is determined by the argument type, the called function's calling convention, the optimization, the architecture and the compiler.
From c99 standard:
6.5.2.2 Function calls
The order of evaluation of the function designator, the actual
arguments, and subexpressions within the actual arguments is
unspecified, but there is a sequence point before the actual call.
Just to add some experiences (borrowed from here).
The following code:
int i=1;
printf("%d %d %d\n", i++, i++, i);
results in
2 1 3
- using g++ 4.2.1 on Linux.i686
1 2 3
- using SunStudio C++ 5.9 on Linux.i686
2 1 3
- using g++ 4.2.1 on SunOS.x86pc
1 2 3
- using SunStudio C++ 5.9 on SunOS.x86pc
1 2 3
- using g++ 4.2.1 on SunOS.sun4u
1 2 3
- using SunStudio C++ 5.9 on SunOS.sun4u