1.

Pick the correct statement.(a) Vectors have dynamic size whereas Array classes have a static size(b) Both vectors and Array classes have a dynamic size(c) Both vectors and Array classes have a static size(d) Vectors have static size whereas Array classes have a dynamic sizeThis question was posed to me in unit test.I need to ask this question from seq_con Vector Class in portion Class Hierarchies, Library & Containers of C++

Answer»

The correct choice is (a) Vectors have DYNAMIC SIZE whereas Array CLASSES have a static size

Explanation: Vectors are IMPLEMENTED in a way so that it can handle any number of elements at a TIME means the size of a vector can vary, whereas Array classes have fixed size.



Discussion

No Comment Found

Related InterviewSolutions