1.

The sequence of destructors being called while using hybrid inheritance is ____________(a) Reverse of constructors being called(b) Reverse of classes being made(c) Reverse of objects being created(d) Reverse of code calling objectsI got this question during an internship interview.Question is taken from Hybrid Inheritance topic in portion Inheritance & its Types of Object Oriented Programming

Answer»

Correct choice is (a) Reverse of constructors being called

The EXPLANATION is: The DESTRUCTORS are always called in reverse order of constructors being called always. The type of inheritance doesn’t MATTER. The only important concept is the sequence of classes being inherited.



Discussion

No Comment Found

Related InterviewSolutions