Author Question: Given that x = 2, y = 1, z = 0, what will the following cout statement display?cout (Read 211 times)

evelyn o bentley

  • Hero Member
  • *****
  • Posts: 564
Given that x = 2, y = 1, z = 0, what will the following cout statement display?
cout << "answer = " << (x || !y && z) << endl;
answer = 2
answer = 0
answer = 1
◦ None of these



Related Topics

Need homework help now?

Ask unlimited questions for free

Ask a Question

Sophiapenny

  • Sr. Member
  • ****
  • Posts: 339

 

Did you know?

Carbamazepine can interfere with the results of home pregnancy tests. If you are taking carbamazepine, do not try to test for pregnancy at home.

Did you know?

The average office desk has 400 times more bacteria on it than a toilet.

Did you know?

Aspirin is the most widely used drug in the world. It has even been recognized as such by the Guinness Book of World Records.

Did you know?

The immune system needs 9.5 hours of sleep in total darkness to recharge completely.

Did you know?

The first successful kidney transplant was performed in 1954 and occurred in Boston. A kidney from an identical twin was transplanted into his dying brother's body and was not rejected because it did not appear foreign to his body.

For a complete list of videos, visit our video library