+ 2
Suppose that x is 1. What is x after the evaluation of the following expression? (x > 1) && (x++ > 1)
3 Respostas
+ 2
x value must be 1
reason: if you use bit wise & it will check second condition too. but , u used Logical &&
so It skip the second condition when first one is false.
if first condition is true then it will definitely checkes second condition .then x value is increased.
for example .,
(x>=1)&&(x++>1)
now x value is increased by one.
I hope u understand..😄
0
Value of x will not change.
x value will remain 1.
As it is checking the condition not declaring it.
- 1
False .
In && operator the 2 conditions must be true, here x is not > 1 so this condition is false, which makes the whole statement false .
I don't know what x++ means, but it's not important .