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
-> 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.