We often compare two quantities depending on their relation and take certain decisions.
Operator |
Meaning |
< | is less than |
<= | is less than or equal to |
> | is greater than |
>= | is greater than |
!= | is not equal to |
#include <stdio.h>
main()
{
int a = 21, b=10, c;
c=(a>b);
printf("%d\n", c );
c=(a<b);
printf("%d\n", c );
}
1
0
--------------------------------
Process exited after 4.931 seconds with return value 0
Press any key to continue . . .