Ch. 4.8: Logical Operators Flashcards
1
Q
What is a logical operator?
A
Logical operators connect two or more relational expressions into one or reverse the logic of an expression.
2
Q
What is the && operator?
A
Takes two expressions as operands and creates an expression that is true only when both subexpressions are true.
3
Q
What is the || operator?
A
The || operator is known as the logical OR operator. It takes two expressions as operands creates an expression that is true when either of the subexpressions are true.
4
Q
What is the ! operator?
A
The ! operator performs a logical NOT operation. It takes an operand and reverses its truth or falsehood.