C++ Containers Question:
Download Questions PDF

Can you please explain the difference between homogeneous and a heterogeneous container?

Answer:

A container is an object holding instances of another object. A container that contains or holds objects of a single type is said to be homogenous. On the other hand, A container that contains objects (derived from a common base class) of a variety of types is termed heterogeneous.

Download C++ Containers Interview Questions And Answers PDF

Previous QuestionNext Question
Do you know what is a container class? What are the types of container classes?Tell me when should we use container classes instead of arrays?