Exam 15: Standard Library Containers and Iterators

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

The erase member function of class vector cannot:

Free
(Multiple Choice)
5.0/5
(32)
Correct Answer:
Verified

B

Assuming that bitset b1 contains the bits [0 1 1 0] and bitset b2 contains the bits [1 1 1 1], which of the following expressions returns true?

Free
(Multiple Choice)
4.8/5
(28)
Correct Answer:
Verified

A

Data loss could occur if the contents of a __________ were placed into any of the other three associative container types.

Free
(Multiple Choice)
4.8/5
(38)
Correct Answer:
Verified

C

Which of the following is not a member function of all sequence containers?

(Multiple Choice)
4.9/5
(37)

Which of the following are mutating-sequence algorithms defined in the Standard Library?

(Multiple Choice)
4.8/5
(31)

Unlike a vector, a deque:

(Multiple Choice)
4.8/5
(42)

The multiset associative container does not:

(Multiple Choice)
4.8/5
(25)

Which of the following is the correct hierarchy of iterator categories (weakest at the left)?

(Multiple Choice)
4.8/5
(31)

The main difference between set and multiset is:

(Multiple Choice)
4.9/5
(41)

Which of the following is not a member function of all sequence containers?

(Multiple Choice)
4.9/5
(32)

As of C++11, you can ask a vector or deque to return unneeded memory to the system by calling member function shrink_to_fit. This requests that the container reduce its capacity to the number of elements in the container. According to the C++ standard, implementations can ignore this request so that they can perform implementation-specific optimizations.

(Multiple Choice)
4.8/5
(40)

Which of the following is a difference between vectors and arrays?

(Multiple Choice)
4.8/5
(42)

Which of the following is not a key component of the Standard Library?

(Multiple Choice)
5.0/5
(34)

Which of the following containers is not considered a near container?

(Multiple Choice)
4.8/5
(35)

If a program attempts to insert a duplicate key into a set:

(Multiple Choice)
4.7/5
(35)

Which of the following statements is true of a priority_queue?

(Multiple Choice)
4.9/5
(25)

Class deque provides:

(Multiple Choice)
4.9/5
(21)

Which category of iterators combines the capabilities of input and output iterators into one iterator?

(Multiple Choice)
4.8/5
(37)

Which of the following applications would a deque not be well suited for?

(Multiple Choice)
4.8/5
(38)

The expression std::multimap<int, double, std::less<int>>::value_type(15, 2.7):

(Multiple Choice)
4.8/5
(41)
Showing 1 - 20 of 33
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)