go to previous page   go to home page   go to next page hear noise highlighting

Answer:

Assume that x contains 9 and y contains 7.

The expression evaluates to False. One way to show this is below.

Boolean Expression

Review of Truth Tables

A truth table shows the evaluation of a boolean expression.

The table at right has four rows for the truth values, one row for each of the four possible choices for the two operands. (The operands are the relational expressions x<12 and y>10.) The last column shows the result of the && operator with those values.

Operands Boolean Expression
x < 12 y > 10 x < 12 && y > 10
F F F
F T F
T F F
T T T

QUESTION 2:

What row of the table is used when x contains 1 and y contains 23?


go to previous page   go to home page   go to next page