1.

What does inheritance allow you to do?(a) create a class(b) create a hierarchy of classes(c) access methods(d) create a methodThe question was asked in semester exam.Query is from Design of Class Hierarchies in portion Derived Classes, Templates & Exception Handling in C++ of C++

Answer»

The correct CHOICE is (b) CREATE a hierarchy of CLASSES

For explanation: Inheritance HELPS in creating hierarchy of classes by making connections between different classes in which one is called base class and other is class derived class.



Discussion

No Comment Found

Related InterviewSolutions