1. Home
  2. Computer Science MCQs
  3. C++ and Object-Oriented Programming
  4. An STL map stores elements as:

Added 30 Nov -0001

An STL map stores elements as:

  1. versions of the same object
  2. key-value pairs sorted by key Correct answer
  3. a contiguous array of values
  4. unique values sorted ascending

Correct answer

B. key-value pairs sorted by key

12 views

MCQSEXAM

Explanation

std::map holds key-value pairs ordered by key, usually implemented as a balanced tree.

Reference

Asked in: NTS, PPSC IT, Campus Interviews

Preparing for an exam?

Doubts & discussion

Not sure why the answer is B? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More C++ and Object-Oriented Programming MCQs

Practise all C++ and Object-Oriented Programming MCQs

Similar MCQs