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
Post a Comment