Relational Operators in C

Last Updated Nov 1, 2015, 07:00:14 PM





Relational operators are used to compare two values and returns the result. Relational operators are also called as comparision operators

The below table lists all the assignment operators available in C programming.

Operator Description Example
== It is used to check if values of two operands are equal or not (X == Y) is not TRUE
!= It is used to check if two operands are equal or not (X != Y) is not TRUE
> It is used to check if the left operand is greater than the value of right operand (X > Y)
< It is used to check if the right operand is greater than the value of left operand (X < Y)
<= It is used to check if the value of left operand is less than or equal to the value of right operand (X <= Y)
>= It is used to check the value of left operand is less than or equal to the value of right operand (X >=Y)

Relational Operators Example

Try It Now

Other Operator Topics you might want to learn

Global Variables in C

Static Variabls in C

Difference between Static and Global Variables- StackOverFlow