Author Question: What will the following code display?int x = 0;while (x < 5){ cout (Read 60 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?

The highest suicide rate in the United States is among people ages 65 years and older. Almost 15% of people in this age group commit suicide every year.

Did you know?

In 1885, the Lloyd Manufacturing Company of Albany, New York, promoted and sold "Cocaine Toothache Drops" at 15 cents per bottle! In 1914, the Harrison Narcotic Act brought the sale and distribution of this drug under federal control.

Did you know?

Although puberty usually occurs in the early teenage years, the world's youngest parents were two Chinese children who had their first baby when they were 8 and 9 years of age.

Did you know?

About 3.2 billion people, nearly half the world population, are at risk for malaria. In 2015, there are about 214 million malaria cases and an estimated 438,000 malaria deaths.

Did you know?

In 2012, nearly 24 milliion Americans, aged 12 and older, had abused an illicit drug, according to the National Institute on Drug Abuse (NIDA).

For a complete list of videos, visit our video library