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

Operator ! (not)

Operator ! is a unary prefix operator: unary because it has one operand and
prefix because the operator precedes its operand.

Here is its definition:

!true evaluates to false
!false evaluates to true

The table below gives the values of three variables.


Below, use the checkbox to give the value of the expression --unchecked means false and checked means true.
Then click button Check answer!



checked means true
Help | Glossary
© 2002 Copyright Cornell University