A relational operator checks the relationship between two operands. If the relat

Need help with assignments?

Our qualified writers can create original, plagiarism-free papers in any format you choose (APA, MLA, Harvard, Chicago, etc.)

Order from us for quality, customized work in due time of your choice.

Click Here To Order Now

A relational operator checks the relationship between two operands. If the relat

A relational operator checks the relationship between two operands. If the relation is true, it returns 1; if
the relation is false, it returns value 0. The following table shows all relation operators supported by C.
Program:
#include
#include
void main()
{
int a = 5, b = 5, c = 10;
clrscr();
printf(“%d == %d is %d n”, a, b, a == b);
printf(“%d == %d is %d n”, a, c, a == c);
printf(“%d > %d is %d n”, a, b, a > b);
printf(“%d > %d is %d n”, a, c, a > c);
printf(“%d < %d is %d n", a, b, a < b); printf("%d < %d is %d n", a, c, a < c); printf("%d != %d is %d n", a, b, a != b); printf("%d != %d is %d n", a, c, a != c); printf("%d >= %d is %d n”, a, b, a >= b);
printf(“%d >= %d is %d n”, a, c, a >= c);
printf(“%d <= %d is %d n", a, b, a <= b); printf("%d <= %d is %d n", a, c, a <= c); getch(); } Output: 5 == 5 is 1 5 == 10 is 0 5 > 5 is 0
5 > 10 is 0
5 < 5 is 0 5 < 10 is 1 5 != 5 is 0 5 != 10 is 1 5 >= 5 is 1
5 >= 10 is 0
5 <= 5 is 1 5 <= 10 is 1

Need help with assignments?

Our qualified writers can create original, plagiarism-free papers in any format you choose (APA, MLA, Harvard, Chicago, etc.)

Order from us for quality, customized work in due time of your choice.

Click Here To Order Now