♦ Logical Operators in C++
♣ Example4: Logical Operators in C++
Logical Operators in C++ are used to evaluate conditional statements and produce Boolean output.Operator@Working |
---|
&&@returns True if all variables/statements are True |
||@returns True if atleast one variables/statements are True |
~@returns the reverse of Boolean value |
Example
Input:
Output: