+ 1

Why output of same program is different in Java & C++

int x=10; x=x++; x=x++; x=x++; SOP(x); //10 cout<<x; //13

11th Jul 2017, 10:34 AM
Sam Altaf
Sam Altaf - avatar
4 Answers
+ 6
Because compilers from different languages act differently.
11th Jul 2017, 11:15 AM
Hatsy Rei
Hatsy Rei - avatar
+ 1
so can you explain me internal flow of the above code why output is 10 in java?
12th Jul 2017, 2:29 AM
Sam Altaf
Sam Altaf - avatar
+ 1
so can you explain me internal flow of the above code why output is 10 in java?
15th Jul 2017, 6:34 AM
Sam Altaf
Sam Altaf - avatar
0
Syntax and Compilation process for c++ and Java both are different. Both the language has its on different process.
14th Jul 2017, 12:48 PM
Jignesh Gothi
Jignesh Gothi - avatar