1.

Which of the following is accessed by a member function of a class?(a) The object of that class(b) All members of a class(c) The public part of a class(d) The private part of a classI have been asked this question during an interview for a job.My question is based upon C++ Concepts topic in chapter Basics Concepts of C++ of C++

Answer»

The correct choice is (b) All MEMBERS of a class

The EXPLANATION is: A MEMBER function of a class can access all the members of its class whether they are PRIVATE, protected or public.



Discussion

No Comment Found

Related InterviewSolutions