+ 1
Why output of code 'cout<<a<<++a<<a;' in c++ is 666 where a=5
according to me it should be 566 please explain it
3 Answers
+ 1
It's not. The behavior of that code is undefined. See:
https://www.sololearn.com/Discuss/989706/?ref=app
https://www.sololearn.com/Discuss/957040/?ref=app
https://www.sololearn.com/Discuss/1036434/?ref=app
https://www.sololearn.com/Discuss/1073271/?ref=app
0
What is the value of a?
0
thanks for clearing my doubt guys