0
what is the output and how?
int a=3; int b=2; b=a++; cout<<++b;
1 Odpowiedź
+ 12
b = a++; // post increment
This statement makes a = 4 and b = 3
cout << ++b; // pre increment
b is now 4 and the term ++b is also 4
Output: 4
More details on pre and post increment:
https://www.sololearn.com/discuss/407846/?ref=app