1.

If single inheritance is used, program will contain ________________(a) At least 2 classes(b) At most 2 classes(c) Exactly 2 classes(d) At most 4 classesThe question was posed to me during an interview for a job.Origin of the question is Single Level Inheritance topic in chapter Inheritance & its Types of Object Oriented Programming

Answer»

Correct answer is (a) At least 2 classes

Easy explanation - The PROGRAM will contain at least 2 classes in the SENSE of base and DERIVED classes. At least one base CLASS and one derived class must be there. TYPES of inheritance remains the same though.



Discussion

No Comment Found

Related InterviewSolutions