Author Question: Given that x = 2, y = 1, z = 0, what will the following cout statement display?cout (Read 281 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?

Your heart beats over 36 million times a year.

Did you know?

The term pharmacology is derived from the Greek words pharmakon("claim, medicine, poison, or remedy") and logos ("study").

Did you know?

By definition, when a medication is administered intravenously, its bioavailability is 100%.

Did you know?

The most dangerous mercury compound, dimethyl mercury, is so toxic that even a few microliters spilled on the skin can cause death. Mercury has been shown to accumulate in higher amounts in the following types of fish than other types: swordfish, shark, mackerel, tilefish, crab, and tuna.

Did you know?

During pregnancy, a woman is more likely to experience bleeding gums and nosebleeds caused by hormonal changes that increase blood flow to the mouth and nose.

For a complete list of videos, visit our video library