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

Over time, chronic hepatitis B virus and hepatitis C virus infections can progress to advanced liver disease, liver failure, and hepatocellular carcinoma. Unlike other forms, more than 80% of hepatitis C infections become chronic and lead to liver disease. When combined with hepatitis B, hepatitis C now accounts for 75% percent of all cases of liver disease around the world. Liver failure caused by hepatitis C is now leading cause of liver transplants in the United States.

Did you know?

About 600,000 particles of skin are shed every hour by each human. If you live to age 70 years, you have shed 105 pounds of dead skin.

Did you know?

A seasonal flu vaccine is the best way to reduce the chances you will get seasonal influenza and spread it to others.

Did you know?

The Food and Drug Administration has approved Risperdal, an adult antipsychotic drug, for the symptomatic treatment of irritability in children and adolescents with autism. The approval is the first for the use of a drug to treat behaviors associated with autism in children. These behaviors are included under the general heading of irritability and include aggression, deliberate self-injury, and temper tantrums.

Did you know?

The senior population grows every year. Seniors older than 65 years of age now comprise more than 13% of the total population. However, women outlive men. In the 85-and-over age group, there are only 45 men to every 100 women.

For a complete list of videos, visit our video library