Comparison Operators

int x = 5;
int y = 3;
printf("%d", x > y);
// returns 1 (true) because 5 is greater than 3

Symbol Name Example
== equals x == y
!= not equal to x != y
> greater than x > y
< less than x < y
>= greater than or equal to x >= y
<= less than or equal to x <= y
Comparison operators are used to compare two values
Comments