Exercises

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

    1. Many of the Standard Library algorithms can be applied to various containers independently of the underlying container implementation.

    2. arrays are fixed in size and offer direct access to any element.

    3. forward_lists are singly linked lists, that offer rapid insertion and deletion only at the front and the back.

    4. sets offer rapid lookup and duplicates are allowed.

    5. In a priority_queue, the lowest-priority element is always the first element out.

    6. The sequence containers represent non-linear data structures.

    7. As of C++11, there is now a non-member function version of swap that swaps the contents of its two arguments (which must be of different container ...

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.