1.

What is a pair?(a) Container consisting of two data elements of the same type(b) Container consisting of two data elements of different type(c) Container consisting of one header and two data elements of the same type(d) Container consisting of two data elements can have the same or different typeI have been asked this question in an online interview.Enquiry is from STL topic in portion Class Hierarchies, Library & Containers of C++

Answer»

The CORRECT choice is (d) Container CONSISTING of TWO data elements can have the same or different type

To explain: PAIR is a container defined in STL which consist of two elements which can be of same or different types.



Discussion

No Comment Found

Related InterviewSolutions