Define :
C++ Comparison Operator can be used to compare two values. When condition value is true return 1 and otherwise false then return 0.
Operator |
Example |
Description |
== |
a == b |
Equal to |
!= |
a != b |
Not equal to |
> |
a > b |
Greater than |
< |
a < b |
Less than |
<= |
a <= b |
Less than equal to |
>= |
a >= b |
Greater than equal to |
Example :
Output :