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

The ratio of hydrogen atoms to oxygen in water (H2O) is 2:1.

Did you know?

Your chance of developing a kidney stone is 1 in 10. In recent years, approximately 3.7 million people in the United States were diagnosed with a kidney disease.

Did you know?

When intravenous medications are involved in adverse drug events, their harmful effects may occur more rapidly, and be more severe than errors with oral medications. This is due to the direct administration into the bloodstream.

Did you know?

The first-known contraceptive was crocodile dung, used in Egypt in 2000 BC. Condoms were also reportedly used, made of animal bladders or intestines.

Did you know?

The types of cancer that alpha interferons are used to treat include hairy cell leukemia, melanoma, follicular non-Hodgkin's lymphoma, and AIDS-related Kaposi's sarcoma.

For a complete list of videos, visit our video library