Author Question: What will the following code display?int x = 0;while (x < 5){ cout (Read 66 times)

Beheh

  • Hero Member
  • *****
  • Posts: 520
What will the following code display?
int x = 0;
while (x < 5)
{
    cout << x << " ";
    x++;
}

0 1 2 3 4
0 1 2 3 4 5
0
1
2
3
4

◦ This is an infinite loop


nanny

  • Sr. Member
  • ****
  • Posts: 313

Related Topics

Need homework help now?

Ask unlimited questions for free

Ask a Question
 

Did you know?

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

Did you know?

The liver is the only organ that has the ability to regenerate itself after certain types of damage. As much as 25% of the liver can be removed, and it will still regenerate back to its original shape and size. However, the liver cannot regenerate after severe damage caused by alcohol.

Did you know?

Cocaine was isolated in 1860 and first used as a local anesthetic in 1884. Its first clinical use was by Sigmund Freud to wean a patient from morphine addiction. The fictional character Sherlock Holmes was supposed to be addicted to cocaine by injection.

Did you know?

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

Did you know?

There are 60,000 miles of blood vessels in every adult human.

For a complete list of videos, visit our video library