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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the ! operator?

A

The ! operator performs a logical NOT operation. It takes an operand and reverses its truth or falsehood.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly