Question
#include <iostream>
#include <deque>
using namespace std;
int main ()
{
unsigned int i;
deque<int> mydeque;
mydeque.push_back (100);
mydeque.push_back (200);
mydeque.push_back (300);
for(deque<int> :: iterator it = mydeque.begin(); it != mydeque.end(); ++it)
{
}
mydeque.clear();
mydeque.push_back (110);
mydeque.push_back (220);
for(deque<int> :: iterator it = mydeque.begin(); it != mydeque.end(); ++it)
cout << ' ' << *it;
cout << '\n';
return 0;
}
a.
110
b.
220
c.
Both 110 & 220
d.
None of the mentioned
Posted under Object Oriented Programming Using C++
Engage with the Community - Add Your Comment
Confused About the Answer? Ask for Details Here.
Know the Explanation? Add it Here.
Q. What is the output of this program?
Similar Questions
Discover Related MCQs
Q. How the list containers are implemented?
View solution
Q. Which of the following does not support any insertion or deletion?
View solution
Q. What do container adapter provide to interface?
View solution
Q. What does the sequence adaptor provide?
View solution
Q. Which are presented in the container adaptors?
View solution
Q. In which context does the stack operates?
View solution
Q. Which operator is used in priority queue?
View solution
Q. What do associate containers implement?
View solution
Q. By using which of the following the elements in the associate container can
View solution
Q. How many items are presented in the associate container?
View solution
Q. How many instance are allowed by map and set while inserting a element into container?
View solution
Q. What do maps and sets support?
View solution
Q. What kind of library is Standard Template Library?
View solution
Q. To what type of object does the container can be instantiated?
View solution
Q. What type of class template is list?
View solution
Q. What type of access does deque and vector provide?
View solution
Q. Where does the vector add the item?
View solution
Q. Which are not full container classes in c++?
View solution
Q. What is the lifetime of the element in container?
View solution
Q. What do all STL containers define?
View solution
Suggested Topics
Are you eager to expand your knowledge beyond Object Oriented Programming Using C++? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!