0
I am getting ans as 12,11,12 how it is compiling🤔
4 Respostas
+ 7
It's undefined behaviour, please don't do this, you're making me cry :'(.
+ 3
pre increment is first increment the value by 1 then use it and in post increment first value is used then store
a=10
a++=a+1=11 so a++=11
++a=a+1=12 so ++a=12
and last value of a after increment is 12 so a=12
https://www.sololearn.com/discuss/489143/?ref=app
0
a++ means a=a+1 not a++=a+1