Book Image

Learning Boost C++ Libraries

By : Arindam Mukherjee
Book Image

Learning Boost C++ Libraries

By: Arindam Mukherjee

Overview of this book

Table of Contents (19 chapters)
Learning Boost C++ Libraries
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Self-test questions


For multiple choice questions, choose all the options that apply:

  1. Which of the following are true for flat associative containers compared to ordered/unordered associative containers?

    a. Require less memory

    b. Insertion is faster

    c. Traversal is slower

    d. Lookups are faster

  2. The std::forward_list does not provide a size() member function because:

    a. Linear time size members cannot be supported for singly-linked lists

    b. Both splice and size members cannot be constant time

    c. It would be thread-unsafe

    d. All of the above

  3. Where is the internal memory of a static_vector allocated:

    a. Stack

    b. Depends on where the static vector is created

    c. Free store

    d. Depends on the allocator used

  4. In order to store objects of type X in an unordered container, which of the following must be defined/available for objects of type X?

    a. Ordering relation

    b. Hash function

    c. Equality comparison

    d. Copy constructor

  5. Which data structure allows random access to its elements and supports iterators that are not invalidated...