Relational Operators

I l @ ve RuBoard

Relational Operators

Each operator compares the value at its left to the value at its right.

< Less than
<= Less than or equal to
== Equal to
>= Greater than or equal to
> Greater than
!= Unequal to

Relational Expressions

A simple relational expression consists of a relational operator with an operand on each side. If the relation is true, the relational expression has the value 1 . If the relation is false, the relational expression has the value .

5 > 2 is true and has the value 1 .

(2 + a) == a is false and has the value .

I l @ ve RuBoard


C++ Primer Plus
C Primer Plus (5th Edition)
ISBN: 0672326965
EAN: 2147483647
Year: 2000
Pages: 314
Authors: Stephen Prata

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net