{ A destination to learn coding }

Operators


Relational Operators

Operator Action
> greater than
>= greater than or equal to
< less than
<= less than or equal to
== equal to
!= not equal to

Relational Operators refers to the relation between the two values.
Relational Operators give only 2 values, either true or false. If the condition is true, the expression will return 1 and if the condition is false the expression will return 0.

Try This
#include<stdio.h>
int main
{
printf("%d\n",100>10);
/*The output would be 1 since the condition is true. */

int x=90;
printf("%d\n",x<=10);
/*The output would be 0 since the condition is false.*/
int a=50;b=3;

printf("%d",(a%b)==2);
/*output 1*/

return 0;
}
		

C Codes