C++ Containers Question:

Tell me when should we use container classes instead of arrays?

Tweet Share WhatsApp

Answer:

It is advisable to use container classes of the STL so that you don’t have to go through the pain of writing the entire code for handling collisions, making sure its working well, testing it repeatedly with an overhead of time consumption.

Suppose you have some data that has values associated with strings and its fields consist of grades> in this situation you can directly use hash table instead of having it created by yourself.

Download C++ Containers PDF Read All 19 C++ Containers Questions
Previous QuestionNext Question
Can you please explain the difference between homogeneous and a heterogeneous container?What is associative container?