+ 1

Can you please explain to me why the correct answer is 1?

Please explain Int x=0, y=0; If(++x>4&&++y>2) X++ Syso(x)

27th Dec 2019, 8:30 PM
Sin Mar
Sin Mar - avatar
2 Answers
+ 4
Because here ++x will increase the value of x means x will be 1 but your if condition is false so it will not go inside. That is why x is 1
27th Dec 2019, 8:44 PM
AĶ¢J
AĶ¢J - avatar