

Tutorial of C language
Computer Language Introduction to C Programming in C Structure of C program Variable in C Datatypes in C Token in C Operator in C Precedence of C Operator Assignment Operator in C Logical Operator in C Bitwise Operator in C Ternary Operator in C C Input Output Pointers in C Storage Classes of C Control Structure of C C Decision Making Statement C Looping Statement C Jumping Statement C Function Function Call By Value Function Call By Reference C Input Output Function C Structure Array in C Union in C 
Logical Operator
AND (&&) Operator:This operator gives the net result true if the condition or expression have the value true(1), otherwise gives the net result false.Let x=20 and y=10 The logical expression is (x==20) && (x>y) This gives the result true because both the condition (x==20) and (x>y) are true and gives the net result true. Let x=10 and y=20 The logical expression is (x==10) && (x>y) This gives the result false because the condition (x==20) is true but the condition(x>y) is false and gives the net result false. OR (  ) Operator:This operator gives the net result false, if both the conditions have the value false, otherwise it gives the net result true.Let x=10 and y=20 The logical expression is (x>=y)  (x>20) This gives the result false because both the conditions are false and gives the net result false. Let x=10 and y=20 The logical expression is (x>=y)  (y>10) This gives the result true because one condition is true and thus gives the net result true. NOT ( ! ) Operator:Example: Let x=10 The logical expression is !(x>5) Here the condition (x>5) is true. NOT operator negates the value of the condition. Hence the result is false. Bitwise Operator in C >> Ternary Operator in C >> C Input Output >> Pointers in C >> Storage Classes of C >> Home Clouds 
