+ 1
Can somebody please explain how is the output 5 ??
int a=2; int b=3; while(b--) ++a; cout <<a;
1 Réponse
+ 20
as long as "b" isnt "0" -> "a++" will be executed.... (the final value of "a" will be the initial sum of "a+b" (5) )
int a=2; int b=3; while(b--) ++a; cout <<a;