ExamVeda
Login
Home
C plus plus miscellaneous
?

What will be the output of the following C++ code?
#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;
}

Answer & Solution
Correct Answer: Option C
Let's discuss the solution. Join the discussion
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.