21 Nov 2019

  • November 21, 2019
  • Amitraj
4.) Logical - Operator:-

 -> It refers to the boolean values which can be expressed as:

   1. Binary logical operations, which involves two variables: AND and OR
   2. Unary logical operation: NOT

Logical Operators in C/C++ Includes –

&& (AND) – It is used to check if both the operands are true.

|| (OR) – These operators are used to check if at least one of the operand is true.

! (NOT) – Used to check if the operand is false



*NOTE:  If the logical statement is satisfied (it is true), then the program will return the value 1, otherwise, if the relational statement is not satisfied (it is false), the program will return the value 0.


Translate

Popular Posts