Given the following vector initialization:
int fill[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};vector ex1(fill, fill+sizeof (fill)/sizeof (int)) ; What is output by each of the following code segments?
a. cout << ex1.size() << " " << ex1.front() << " " << ex1.back();b. cout << ex1[3] << " " << ex1[5] << " " << ex1[9];c. ex1 .erase (ex1 .begin ()+4) ; cout << ex1[3] << " " << ex1[4] << " " << ex1 [5];d. vector::iterator i; ex1.erase(ex1. begin()) ; for (i = ex1.begin()+2; i != ex1.end(); i++) cout << *i << endl;
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.