Question 4: What does the following code output? vector icecream ( 10, "Vanilla" ); icecream.insert( icecream.begin() +5, "Chocolate" ); icecream.erase( icecream.begin () +0, icecream.begin () +4 ); icecream.pop_back () ; icecream.pop_back () ; icecream.pop_back () ; icecream.pop_back (); icecream.push_back( "Mint" ); icecream.push_back( "Almond ); cout << "ICECREAM: [--"; 0 i < icecream.size(); i++) for int i cout << icecream[ i ]< "--"; cout << "] ";

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter9: Using Classes And Objects
Section: Chapter Questions
Problem 9E
icon
Related questions
Question
Question 4: What does the following code output?
vector <string> icecream ( 10, "Vanilla" );
icecream.insert( icecream.begin() +5, "Chocolate" );
icecream.erase( icecream.begin () +0,
icecream.begin () +4 );
icecream.pop_back () ;
icecream.pop_back () ;
icecream.pop_back () ;
icecream.pop_back ();
icecream.push_back( "Mint" );
icecream.push_back( "Almond );
cout << "ICECREAM: [--";
0 i < icecream.size(); i++)
for int i
cout << icecream[ i ]< "--";
cout << "] ";
Transcribed Image Text:Question 4: What does the following code output? vector <string> icecream ( 10, "Vanilla" ); icecream.insert( icecream.begin() +5, "Chocolate" ); icecream.erase( icecream.begin () +0, icecream.begin () +4 ); icecream.pop_back () ; icecream.pop_back () ; icecream.pop_back () ; icecream.pop_back (); icecream.push_back( "Mint" ); icecream.push_back( "Almond ); cout << "ICECREAM: [--"; 0 i < icecream.size(); i++) for int i cout << icecream[ i ]< "--"; cout << "] ";
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,