Author Question: Given that x = 2, y = 1, z = 0, what will the following cout statement display?cout (Read 295 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 average human gut is home to perhaps 500 to 1,000 different species of bacteria.

Did you know?

Individuals are never “cured” of addictions. Instead, they learn how to manage their disease to lead healthy, balanced lives.

Did you know?

Illicit drug use costs the United States approximately $181 billion every year.

Did you know?

The human body's pharmacokinetics are quite varied. Our hair holds onto drugs longer than our urine, blood, or saliva. For example, alcohol can be detected in the hair for up to 90 days after it was consumed. The same is true for marijuana, cocaine, ecstasy, heroin, methamphetamine, and nicotine.

Did you know?

In the United States, there is a birth every 8 seconds, according to the U.S. Census Bureau's Population Clock.

For a complete list of videos, visit our video library