C++ Type Checking Question:

Explain what are associate containers?

Tweet Share WhatsApp

Answer:

Containers are objects that hold other objects. An associative container stores pair of values. It is typically a key-value pair. Given one value (key), we can access the other, called the mapped value. The key needs to be unique. The value associated with that key could be unique or multiple depending upon the type of associative container.

The key-value pair could be of any data type (unlike integer in case of array).
There are various types of associative containers:

Map: It is a traditional associate array, where a single value is associated with each unique pair.

Multimap : This type of associative array allows duplicate elements (value) for a given key.

Download C++ Type Checking PDF Read All 27 C++ Type Checking Questions
Previous QuestionNext Question
Do you know what are function prototypes?What is static type checking?