0

How does increment operator work in c++?

x++ does what exactly example of how to use it as compared to ++x, like in the quiz if x=2; y=3; y=x++; means y's value is 3 but when u cout<<++y how come the value doesn't change to 4 but remains 3???!!!##@

3rd Mar 2017, 5:03 PM
jthe45
2 Antworten
+ 1
add one more cout<<y will see (after what you have already)
3rd Mar 2017, 6:19 PM
AjronSh
0
thanx will try that....
3rd Mar 2017, 8:33 PM
jthe45