Sequence Adapters(C++ Programming ) Questions and Answers

Question 1.

Which are presented in the container adaptors?


  1.    stack
  2.    queue
  3.    priority_queue
  4.    All of the mentioned
Explanation:-
Answer: Option D. -> All of the mentioned

These mentioned things are presented in container adapters.



Question 2.

What does the sequence adaptor provide?


  1.    Insertion
  2.    Deletion
  3.    Interface to sequence container
  4.    None of the mentioned
Explanation:-
Answer: Option C. -> Interface to sequence container

None.



Question 3.

What do container adapter provide to interface?


  1.    Restricted interface
  2.    More interface
  3.    No interface
  4.    None of the mentioned
Explanation:-
Answer: Option A. -> Restricted interface

A container adapter provides a restricted interface to a container.In particular, adapters do not 

provide iterators; they are intended to be used only through their specialized interfaces.