Operator |
Meaning |
&& | logical AND |
|| | logical OR |
! | logical NOT |
#include <stdio.h>
main()
{
int a = 21, b=10, c;
c=(a>b && a<b);
printf("%d\n", c );
c=(a>b || a<b);
printf("%d\n", c );
c=!(a>b || a<b);
printf("%d\n", c );
}
0
1
0
--------------------------------
Process exited after 1.843 seconds with return value 0
Press any key to continue . . .