Tuesday 12 February 2013

Logical Operators in C Language Programming


Logical operators are used to combine conditions. The notations for logical operators in C are,

OR   -  ||
AND  -  &&
NOT  -  !

* The notation for the operator OR is two broken vertical lines.

The operators follow the same precedence in compound conditions as in other languages - NOT (!) is evaluated before AND (&&) which is evaluated before OR (||). Brackets() are used to change this order.



0 comments:

Post a Comment

Powered by Blogger.