Self-Review Exercises

  1. 15.1 State whether each of the following is true or false. If false, explain why.

    1. Pointer-based code is complex and error prone—the slightest omissions or oversights can lead to serious memory-access violations and memory-leak errors that the compiler will warn you about.

    2. deques offer rapid insertions and deletions at front or back and direct access to any element.

    3. lists are singly linked lists and offer rapid insertion and deletion anywhere.

    4. multimaps offer one-to-many mapping with duplicates allowed and rapid key-based lookup.

    5. Associative containers are nonlinear data structures that typically can locate elements stored in the containers quickly.

    6. The container member function cbegin returns an iterator that refers ...

Get C++ How to Program, 10/e now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.