Ask your own question, for FREE!
Computer Science 24 Online
OpenStudy (anonymous):

int x=1; printf("%d%d%d",x,x++,++x); what is the output and how?

OpenStudy (harsimran_hs4):

--> all the arguments of a function(printf) are evaluated before being passed --> This order in which these arguments are evaluated relative to each other is unspecified --> This order of evaluation is dependent on the compiler and sometimes a compiler may also choose different order Conclusion : such statement`s behavior is undefined.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!