Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

C++ Institute Exam CPP Topic 9 Question 13 Discussion

Actual exam question for C++ Institute's CPP - C++ Certified Professional Programmer exam
Question #: 13
Topic #: 9
[All CPP - C++ Certified Professional Programmer Questions]

What happens when you attempt to compile and run the following code?

#include

#include

#include

#include

#include

using namespace std;

int main()

{

deque mydeck;list mylist; vector myvector;

queue first; queue second(mydeck);

queue third(second); queue > fourth(mylist);

fourth.push(10);fourth.push(11);fourth.push(12);

queue > fifth(myvector);

fifth.push(10);fifth.push(11);fifth.push(12); // Line I

while(!fifth.empty())

{

cout<

fifth.pop(); // Line III

}

while (!fourth.empty())

{

cout << fourth.front() << " ";

fourth.pop(); // Line IV

}

return 0;

}

Show Suggested Answer Hide Answer
Suggested Answer: D

Contribute your Thoughts:

Currently there are no comments in this discussion, be the first to comment!


Save Cancel