1.

How to access the overridden method of base class from the derived class?(a) Using arrow operator(b) Using dot operator(c) Using scope resolution operator(d) Can’t be accessed once overriddenThe question was posed to me at a job interview.The question is from Overriding Member Functions in section Member Functions & its Types of Object Oriented Programming

Answer»

Correct choice is (c) USING scope resolution operator

To EXPLAIN: Scope resolution operator :: can be USED to access the BASE class method even if overridden. To access those, first base class NAME should be written followed by the scope resolution operator and then the method name.



Discussion

No Comment Found

Related InterviewSolutions