Given the following deque initialization:
int fill[] = {27, 16, 81, 42, 22, 75, 3, 49, 12, 3, 7, 2, 4};deque ex3(fill, fill+sizeof(fill)/sizeof(int)); What is output by each of the following code segments?
a. cout << ex3.size() << " " << ex3.front () << " " << ex3.back();b. cout << *ex3.begin() << " " << * (--ex3 .end ()) << << *ex3.rbegin() << " " << * (--ex3. rend ()) ;c. cout << ex3[2] << " " << ex3[6] << " " << ex3[8];d. ex3.erase(ex3.begin() +4) ; cout << ex3[3] << " " << ex3[4] << " " << ex3[5];e. ex3.insert(++ex3.begin() , 99); ex3.pop_back(); cout << *ex3.begin();f. deque::iterator i = ex3.begin() ; while (i != ex3.end()) if (*i%2 == 1) i = ex3.erase(i); else i++; for (i = ex3.begin(); i != ex3.end(); i++) cout << *1 << 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.