The output of program given in description is 1 and i m not able to understand why ? Plz explain it. Thank you | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

The output of program given in description is 1 and i m not able to understand why ? Plz explain it. Thank you

#include <iostream> using namespace std; int main() { int x = 1; x=x++; cout<<x; return 0; }

8th Sep 2017, 6:15 PM
Soham Nathani
Soham Nathani - avatar
3 Answers
+ 1
yup got it.
9th Sep 2017, 11:55 AM
Soham Nathani
Soham Nathani - avatar
+ 1
thnx
9th Sep 2017, 11:55 AM
Soham Nathani
Soham Nathani - avatar
0
i cant understand the part where x is being rewritten
9th Sep 2017, 3:57 AM
Soham Nathani
Soham Nathani - avatar