Logical Operators

C also includes the unary logical operator! (NOT), || (OR). Expression connected by && or || are evaluated left to right, and evaluation stops as soon as the truth or falsehood of the result is known.


C also includes the unary logical operator! (NOT) that negates the value of a logical expression, i.e., it causes an expression that is originally true to become false, and vice versa. This operator is referred to as the logical negation (or logical not) operator. The truth table of logical operators are given in table.


&&     ||     !


For Example

(x<y)    &&    (y>z)    !    (a<b)      (p==q)    ||    (p<r)



About the Author



Silan Software is one of the India's leading provider of offline & online training for Java, Python, AI (Machine Learning, Deep Learning), Data Science, Software Development & many more emerging Technologies.

We provide Academic Training || Industrial Training || Corporate Training || Internship || Java || Python || AI using Python || Data Science etc





 PreviousNext