Answer the following statements true (T) or false (F)

1) sets offer rapid lookup and duplicates are allowed.
2) In a priority_queue, the lowest-priority element is always the first element out.
3) The sequence containers represent non-linear data structures.
4) 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 types) using move operations
rather than copy operations.
5) Container member function erase removes all elements from the container.

1. False. No duplicates are allowed.
2. False. The highest priority element is always the first element out.
3. False. They represent linear data structures.
4. False. The two arguments must be of the same container type.
5. False. It removes one or more elements from the container

Computer Science & Information Technology

You might also like to view...

When we access external data, a location that temporarily stores data between one process and another is called a ______.

a) block b) buffer c) file d) record

Computer Science & Information Technology

What does the following code print?

``` System.out.print("*"); System.out.print("***"); System.out.print("*****"); System.out.print("****"); System.out.println("**"); ```

Computer Science & Information Technology