1.

What are public member functions?(a) Functions accessible outside the class but not in derived class(b) Functions accessible outside the class directly(c) Functions accessible everywhere using object of class(d) Functions that can’t be accessed outside the classI have been asked this question during an internship interview.I'm obligated to ask this question of Public Member Functions in portion Member Functions & its Types of Object Oriented Programming

Answer»

Correct choice is (C) Functions accessible everywhere using OBJECT of class

The EXPLANATION is: The most suitable definition WOULD be that public member functions are accessible everywhere using object of the class. If derived CLASSES are using those, derived class object can be used to call those functions.



Discussion

No Comment Found

Related InterviewSolutions