0
int x=5; printf("%d %d %d", x++,x,x); What is the output?in c++ and java
why they are different
1 Answer
+ 5
The result is varied because of the architecture of Compiler.
â Some compilers starts executing from left to right & some from right to left.
Tip : It is recommended to write these types of codes in a separate line.
-------------------------------------------
* For deeper understanding you can search on google "Undefined behaviour in C/C++".