+ 3
Anyway explain the below code..how the output became 0 -1 0
{ int a =-1,b=-1,c; c=++a&&b++; cout << a<<endl<<b<<endl<<c; } output----> 0 -1 0
1 Respuesta
+ 4
++a&&b++
a is incremented by 1
a=0
0 is false so the whole statement would be false
So the other side (b++) is skipped
b is still -1 and c is set to 0