InterviewSolution
Saved Bookmarks
| 1. |
Which among the following is not possible for member function?(a) Access protected members of parent class(b) Definition without return type(c) Access public members of subclass(d) Access static members of class |
|
Answer» Right choice is (c) Access public members of subclass To explain: A member function of a class can only have the access to the members of its own class and parent classes if inheritance used. Otherwise a member function can never access the members of a subclass. Accessing static members of a class is possible by normal and static member functions. |
|