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;
    deque<int> :: iterator it;
    mydeque.push_back ( 100 );
    mydeque.push_back ( 200 );
    mydeque.push_back ( 300 );
    for (it = mydeque.begin(); it != mydeque.end(); ++it)
        mydeque.clear();
    cout << ' ' << *it;
}

Answer & Solution
Correct Answer: Option D
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.