13. WRITE A C PROGRAM TO UNDERSTAND RELATIONAL OPERATORS

/*C Program to Understand Relational operators*/ 

#include <stdio.h>
int main(void) 
{
int a,b;
a=10; b=20;
printf("Relational Operators output \n");
printf("a < b is : %d \n",a<b);
printf("a <= b is : %d \n",a<=b);
printf("a == b is : %d \n",a==b);
printf("a != b is : %d \n",a!=b);
printf("a > b is : %d \n",a>b);
printf("a >= b is : %d \n",a>=b);
return 0;
}

output

a < b is : 1
a <= b is : 1
a == b is : 0
a != b is : 1
a > b is : 0
a >= b is : 0

Comments