1.

What is mandatory for designing a new container?(a) Classes(b) Iterators(c) Container(d) VariablesThis question was addressed to me in homework.My question is taken from Defining a New Container in section Class Hierarchies, Library & Containers of C++

Answer»

Right ANSWER is (b) ITERATORS

Easiest explanation - Iterators are used to INCREASE the generality of an algorithm. OTHERWISE, we need to DEFINE the algorithm for each types.



Discussion

No Comment Found

Related InterviewSolutions