c++ - printf using stack? -



c++ - printf using stack? -

possible duplicate: confused printf() contains prefix , postfix operators.

i came across code next snippet,

int main() { int c = 100; printf("\n %d \t %d \n", c, c++); homecoming 0; }

i expected output 100 & 101 output

101 100

could help me know why?

the c , c++ standards not guarantee order of evaluation of function parameters. compilers evaluate parameters right left because order pushed on stack using cdecl calling convention.

c++ programming-languages

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -