Author Question: What will the following C++11 code display? vector numbers {3, 5};for (int val : numbers) cout (Read 259 times)

kaid0807

  • Hero Member
  • *****
  • Posts: 515
What will the following C++11 code display?
vector numbers {3, 5};
for (int val : numbers)
    cout << val << endl;

3
3
3
3
3

5
5
5

3
5

◦ Nothing. This code has an error.



Related Topics

Need homework help now?

Ask unlimited questions for free

Ask a Question


 

Did you know?

The lipid bilayer is made of phospholipids. They are arranged in a double layer because one of their ends is attracted to water while the other is repelled by water.

Did you know?

More than nineteen million Americans carry the factor V gene that causes blood clots, pulmonary embolism, and heart disease.

Did you know?

More than 20 million Americans cite use of marijuana within the past 30 days, according to the National Survey on Drug Use and Health (NSDUH). More than 8 million admit to using it almost every day.

Did you know?

The first oral chemotherapy drug for colon cancer was approved by FDA in 2001.

Did you know?

More than 150,000 Americans killed by cardiovascular disease are younger than the age of 65 years.

For a complete list of videos, visit our video library