Logical Operators in C

Last Updated Nov 1, 2015, 07:00:14 PM





Logical operators are used in decision making in computer programs. These operators are also sometimes called as boolean operators such as AND, OR and NOT

The below table lists all the assignment operators available in C programming.

Operator Description Example Try It Now
&& (AND) If both operands are true then only it becomes true (A && B ) if A and B are true then the result is TRUE Try It Now
|| (OR) If any of the operand is true then only it becomes true (A || B ) if A OR B are true then the result is TRUE Try It Now
! (NOT) It is used to reverse the logical state of its operand !(A && B ) is TRUE Try It Now

Logical Operators Example

Try It Now

Other Operators you might want to learn

C-Operators

Arithmetic Operators

Assignment Operators

Relational Operators