#include#include main() { int i,j; // comma operator used printf ("value of i"); scanf ("%d",&i); printf ("value of j"); scanf ("%d",&j); if(i>0)&&(j>0) //logical condition printf("i & j are positive"); else printf("end of program"); }
Operator Meaning && Logical AND || Logical OR ! Logical NOT
Example a < m || a < nThe expression evaluates to true if any one of them is true or if both of them are true. It evaluates to true if a is less than either m or n and when a is less than both m and n.
Example: ! (x >= y)The NOT expression evaluates to true only if the value of x is neither greater than or equal to y ...