Boolean Expression and De Morgan's Law
Suppose p and q are declared as boolean variables and have been initialized to unknown truth values. What does the following boolean expression evaluate to?
Suppose p and q are declared as boolean variables and have been initialized to unknown truth values. What does the following boolean expression evaluate to?
(!p && !q) || !(p || q)
A
The expression always evaluates to false.
B
The expression always evaluates to true.
C
The expression evaluates to true whenever p is false.
D
The expression evaluates to false whenever p and q have opposite truth values.
Question Leaderboard
Not enough data yet to show leaderboard.
