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

Operator || (or)

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 evaluate to true only if at least one of its operands is true;
otherwise, it evaluates to false.

Fill in the values of the "truth table".

For each row, the entry in the column labelled "b || c"
should contain the value of 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