Given that x = 2, y = 1, z = 0, what will the following cout statement display?

cout << "answer = " << (x || !y && z) << endl;

a. answer = 0
b. answer = 1
c. answer = 2
d. None of these

b. answer = 1

Computer Science & Information Technology

You might also like to view...

The slide master is used to change master page formats for all slides

Indicate whether the statement is true or false

Computer Science & Information Technology

To deliver a presentation, use Impress's Speaker Notes view

Indicate whether the statement is true or false

Computer Science & Information Technology