prev

Relational Operators

next
  1. <, <=, >, >= are the relational operators.

  2. ==, != are the equality operators.

  3. && and || are the logical operators.
  4. Expressions connected with logical operators are evaluated left to right. Evaluation stops as soon as the truth or falsehood of an expression is known.

  5. False is represented by a zero, true is represented by a 1. In comparisons any non-zero number is true.

  6. ! performs a unary negation.

  7. Examples