All 6 possible numerical relational operations can be expressed in 'C':
symbol | meaning |
---|---|
< | less than |
> | greater than |
<= | less than or equal to |
>= | greater than or equal to |
== | equal to |
!= | not equal to |
These relations are with the left hand expression with respect to the right hand expression. For example:
a < b
mean: 'a' less than 'b'. All relational expressions have as value either 1 (true) or 0 (false), which are integers. For example:
(5<=3) has the value 0 (9!=6) has the value 1