1.

Member function of a class can ____________(a) Access all the members of the class(b) Access only Public members of the class(c) Access only the private members of the class(d) Access subclass membersThis question was addressed to me in semester exam.This interesting question is from Member Functions in division Class Members & Types of Object Oriented Programming

Answer»

Right OPTION is (a) Access all the members of the class

To EXPLAIN: The MEMBER functions has access to all the members of the class. Whenever data members of a class, which might be private, have to be MODIFIED, we make use of these member functions. This is more secure way to manipulate data.



Discussion

No Comment Found

Related InterviewSolutions