1.

Always the base class constructors are called ___________ constructor of derived class.(a) Before(b) After(c) Along(d) According to priority ofI had been asked this question in an interview for internship.The doubt is from Base Class topic in portion Classes of Object Oriented Programming

Answer»

Correct choice is (a) Before

The best I can explain: When the BASE class object is CREATED, its constructor will be called for sure. But if a derived class constructor is called, FIRST base class constructor is called and then derived class constructor is TAKEN into consideration.



Discussion

No Comment Found

Related InterviewSolutions