1.
Consider the following C++ program segment, which uses the STL.
stack<int,list<int> > S;
Execution of the statement results in creation of which of the following?
(a) A stack of integers
(b) A list of integer stacks
(c) A list of integers
(d) A stack of integer lists
Correct answer is
(a)
Your score on this question is:
10.00
Feedback:
See section 2.4.2 of the course notes.
2.
In order to use the adapter queue from the C++ Standard Template Library, which of the
following preprocessor directives is (are) typically required?
I. #include <queue>
II. #include <deque>
(a) None
(b) I only
(c) I and II
(d) II only
Correct answer is
(b)
Your score on this question is:
10.00
Feedback:
See section 2.4.2 in the course notes.
3.
The queue adapter interface in the C++ Standard Template Library contains which of the
following member functions?
I. push
II. pop_back
(a) None
(b) I only
(c) I and II
(d) II only
Correct answer is
(b)
Your score on this question is:
10.00
Feedback: