1. Logic

Ace your homework & exams now with Quizwiz!

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


Related study sets

Europe: Environmental issues - Acid rain in Germany

View Set

Chapter 3: Ethical Issues In Social Science Research Review

View Set

Chapter 15: Health Information Exchange

View Set

Real Estate Principles Chapter 12

View Set

Robert N. Econ 11-13 Test 11111111111

View Set

Peds - Ch. 30: Atraumatic Care of Children and Families

View Set

Peds- Chapter 44, Mobility, Neuromuscular Disorder peds

View Set