+ 1
Whats is the reason of ++b no apply the sum ?
int a = 3; int b =40; b=a++; consolewrite(++b); answer is 4 but in the console are ++ most be 5 im confused.
1 ответ
+ 14
b=a++ means first assignment of a on b is done and then increment of a
so b becomes 3 and a becomes 4 afterwards
And in output ++b so.. increment first and then output
So the answer is 4