+ 1

How does a++b work?

given int a= 0,b=3; cout <<a++b;

26th Sep 2016, 4:08 AM
Hemprasanth Karunakaran
Hemprasanth Karunakaran - avatar
2 Risposte
+ 2
I think the above statement is error if you type a+++b it outputs 3 and then increments the value of a.All the postfix increment and decrement will occur only after semicolon..
26th Sep 2016, 4:57 AM
Balaji Rs
Balaji Rs - avatar
0
that cant work, its clearly syntax error
27th Sep 2016, 12:22 AM
tombik
tombik - avatar