UGC-NET | UGC-NET CS 2017 Dec 2 | Question 13

A member function can always access the data in __________ , (in C++).
(A) the class of which it is member
(B) the object of which it is a member
(C) the public part of its class
(D) the private part of its class


Answer: (A)

Explanation: A member function can access it’s class member variables, irrespective of the access specifier in which the member variable is declared.So, a member function can always access the data in the class of which it is a member.
So, option (A) is correct.

Quiz of this Question




My Personal Notes arrow_drop_up

Improved By : Kalyan Pavan

Article Tags :

1


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.