+ 2
what is function of ++ after or before an integer
what is function of ++ after or before an integer in code
2 Answers
+ 2
it increments the value of ur variable by 1. if x=3 and x++ gives 4. ++x is pre increment and x++ is post increment.
+ 1
int a=3,b;
b=a++ then cout<<b----->output is 3 but
b=++athen cout<<b------>output is 4