3.18 Short circuit evaluation

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

(y == 3) || (x > 2) What value of y results in short circuit evaluation, which skips evaluating the second operand? a. 2 b. 4 c. 3

c

(x < 4) && (y > 3) What value of x results in short circuit evaluation, which skips evaluating the second operand? a. 6 b. 2 c. 3

a

(y < 3) || (x == 1) What value of y does not result in short circuit evaluation, such that both operands are evaluated? a. 3 b. 1 c. 2

a

((x > 2) || (y < 4)) && (z == 10) Given x = 4, y = 1, and z = 10, which comparisons are evaluated? a. (x > 2), (y < 4), and (z == 10) b. (x > 2) and (z == 10) c. (x > 2) and (y < 4)

b

(x < 3) && (y < 2) && (z == 5) What values of x and y do not result in short circuit evaluation, such that all operands are evaluated? a. x = 2, y = 2 b. x = 1, y = 0 c. x = 4, y = 1 d. x = 3, y = 2

b


Kaugnay na mga set ng pag-aaral

20.2 Questions Answered!! Title is the Growth of Cities

View Set

chapter 27 the fetal heart and chest

View Set

chapter 9 learnsmart opma, CH 9 L.S., CH 9

View Set

Revelations during the Enlightenment

View Set

P&C Chapter 11 - Commercial Crime Coverage

View Set

Chapter 9 thinking, language, and intelligence

View Set