There are two aspects to this question
1. arguments are pushed onto the stack in right to left order, so
show_it(x,y,z);
pushes the arguments z, y, x
This is basically what the previous program tells you
2. arguments can be evaluated in any 'compiler' specific order, and this is something you can never find out (or rely on, even if you manage to figure it out).
show_it(x++,x++,x++);
is what you might try to figure this out, but any such programs are by definition undefined (read: wrong).
When a compiler evaluates the parameters and when it finally decides to push those arguments are different things.
Mmmm
Code:
#include <stdio.h>
int foo ( int x ) {
printf( "%d\n", x );
return x;
}
void show_it(int x,int y,int z) {
printf("the id x is at addr: %p\n",&x);
printf("the id y is at addr: %p\n",&y);
printf("the id z is at addr: %p\n",&z);
}
int main ( ) {
show_it( foo(1), foo(2), foo(3) );
return 0;
}