Assume x = 4 and y = 5, Which of the following is true?
A.x < 5 && y < 5
B.x < 5 || y < 5
C.x > 5 && y > 5
D.x > 5 || y > 5
————————————————————
Assume x = 4, Which of the following is true?
A.!(x == 4)
B.x != 4
C.x == 5
D.x != 5
——————————————————————
Which of the following is equivalent to x != y?
A.! (x = y)
B.x > y && x < y
C.x > y || x < y
D.x >= y || x <= y
——————————————————————
Suppose x=10 and y=10. What is x after evaluating the expression (y >
10) && (x-- > 10)?
A.9
B.10
C.11
D.12
——————————————————
Suppose x=10 and y=10 what is x after evaluating the expression (y >=
10) || (x-- > 10)..
A.9
B.10
C.11
D.12
B 4<5结果是true,5<5结果是false,组合结果true || false 就是true
D x = 4只有D的结果 4 != 5是对的,结果是true
C 选项A是赋值语句,B的结果是不可能成立的,D的结果是永远成立的
B &&具有短路的功能,即如果第一个表达式为false,则不再计算第二个表达式,因为10>10是FALSE,不再接着运行了X的值保持不变
B 因为10>=10是true,不会接着运行X--10
纯手打,把分给我吧。
B
D
C
后面两题看不懂英语。。。