What will the following expression evaluate to !true && !false
True
False
Error
None of the mentioned
View Answer
Correct Answer: B — False
Explanation:
Boolean operator && evaluates to true only when both the values are true.
7 practice sets · Page 1 of 1
What will the following expression evaluate to !true && !false
True
False
Error
None of the mentioned
Correct Answer: B — False
Explanation:
Boolean operator && evaluates to true only when both the values are true.
What will the following expression evaluate to (true && false) || (!true)
True
False
Error
None of the mentioned
Correct Answer: B — False
Explanation:
Boolean operator && evaluates to true only when both the values are true and !true means false hence the whole expression will evaluate to false.
What will the following expression evaluate to true || false
True
False
Error
None of the mentioned
Correct Answer: A — True
Explanation:
Boolean operator || evaluates to true only when both the values are true or one is true and other is false.
What will the following expression evaluate to true && false
True
False
Error
None of the mentioned
Correct Answer: B — False
Explanation:
Boolean operator && evaluates to true only when both the values are true.
The boolean operator && only result in true when both the values are true?
True
False
Correct Answer: A — True
Explanation:
The && operator only results in true when both the values are true rest all cases it evaluates to false.
Which of the following is a valid boolean operator?
and(&&)
or(||)
not(!)
All of the mentioned
Correct Answer: D — All of the mentioned
Explanation:
We have three boolean operators which are and, or, not.
Boolean opeartors are also known as logical operators.
True
False
Correct Answer: A — True
Explanation:
Boolean operators result in boolean values like true or false.