1. Logic
What is the value of: (true && false) || false ? A. true B. false C. error D. i don't know
ANSWER: B
This operator represents the logical AND. A. ++ B. || C. && D. @
ANSWER: C
What is the value of: (! (true && p) || ! p ), where p is a boolean variable: A. true sometimes B. false C. depends on the value of p D. true whatever the value of p
ANSWER: C
This operator takes an operand and reverses its truth/falsehood. A. || B. relational C. arithmetic D. !
ANSWER: D
What is logical is equivalent with ( not(x and y)), where x, y are boolean variables? A. x or y B. not(x) and not(y) C. not(x) and y D. not(x) or not(y)
ANSWER: D
What is the value of (! (true && p) || ! false ), where p is a boolean variable: A. true sometimes B. false C. depends on the value of p D. true whatever the value of p
ANSWER: D
What is the value of: (! (p && !p) || ! p ), where p is a boolean variable: A. true sometimes B. false C. depends on the value of p D. true whatever the value of p
ANSWER: D
What is the value of: (! p && p) , where p is a boolean variable: A. true sometimes B. false C. depends on the value of p D. false whatever the value of p
ANSWER: D
What is the value of: (! p || p ), where p is a boolean variable: A. true sometimes B. false C. depends on the value of p D. true whatever the value of p
ANSWER: D