Questions and Answers


  1. What is the use of the allocator interface in the user-defined container?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    Storage management


  1. How many iterators are needed for the defining a new container?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    There are three main iterators needed for designing a container. They are const iterator, Reverse iterator and Iterator traits.



  1. What are the design requirements for building a container from the scratch?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    These are the design specific requirements for building a container from the scratch.


  1. What is mandatory for designing a new container?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    Iterators



  1. What do we return if we use simple array on a internal container?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    Pointers are legal iterators, so if your internal container is a simple C array, then all you need to do is return the pointers.