iNTRODUCTION What's a type? Values of type boolean Boolean operators Using parentheses Precedence of boolean operators Boolean tyro

Operator && (and)

Operator && is a binary infix operator: binary because it has two operands and
infix because the operator is written between its operands.

Here is an example:

    b && c

Expression  b &&  c evaluates to true only if both operands (b AND c) are true;
if at least one operand is false, it evaluates to false.

Fill in the values of the "truth table".

For each row, the entry in the column labeled "b && c" should contain
the value of expression b && c for the values of b and c given to the left.

b c b && c Show feedback
false false
false true
true false
true true


Help | Glossary
© 2002 Copyright Cornell University