RELATIONAL OPERATORS

Used to compare values and return a Boolean result.

 

int x = 10, y = 20;

printf("%d\n", x == y);  // Equal to

printf("%d\n", x != y);  // Not equal to

printf("%d\n", x > y);   // Greater than

printf("%d\n", x < y);   // Less than

printf("%d\n", x >= y);  // Greater than or equal to

printf("%d\n", x <= y);  // Less than or equal to