0

postfix and prefix

explain this in best and simple way int a = 8 ; int b = 7 ; b = a++ cout <<++b;

13th Nov 2016, 2:29 PM
Alexander Miller
Alexander Miller - avatar
2 Answers
+ 4
b=a++ b equals to whatever a is then a is incremented by 1 while b took it value before the increment happened. cout << ++b; output to screen, but first incrememt b by 1.
13th Nov 2016, 2:39 PM
Burey
Burey - avatar
0
i agree with Burey
8th Jan 2017, 11:41 PM
Mulualem Erdachew(Peter)