1.

If hierarchical inheritance requires to inherit more than one class to single class, which syntax is correct? (A, B, C are class names)(a) hierarchical class A: public B, public C(b) multiple class A: public B, public C(c) many class A: public B, public C(d) class A: public B, public CI got this question during an interview.Enquiry is from Hybrid Inheritance topic in division Inheritance & its Types of Object Oriented Programming

Answer» CORRECT choice is (d) class A: PUBLIC B, public C

To explain I would SAY: The syntax is as same as declaration of other classes. There is no specific KEYWORD defined for USING hybrid inheritance in programming. Only thing is to specify the class name separated by commas.


Discussion

No Comment Found

Related InterviewSolutions