Question: What is the output of following code segment? ostream_iterator screen (cout, ); vector vecList; vector ::iterator vecIt; vecList.push_back(3); vecList.push_back(5); vecList.push_back(7); vecIt = vecList.begin();

What is the output of following code segment? ostream_iterator screen (cout,

What is the output of following code segment? ostream_iterator screen (cout, " "); vector vecList; vector ::iterator vecIt; vecList.push_back(3); vecList.push_back(5); vecList.push_back(7); vecIt = vecList.begin(); ++vecIt; vecList.erase (vecIt); vecList.push_back(9); copy (vecList.begin(), vecList.end(), screen); cout < < endl; for (int i=0; i

Step by Step Solution

3.45 Rating (155 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

It looks like theres a typo in the code a missing quote in the ostreamiterator ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!