InterviewSolution
Saved Bookmarks
| 1. |
Which specifier should be used for member functions of a class?(a) Private(b) Default(c) Protected(d) PublicI had been asked this question during an internship interview.The origin of the question is Access Specifiers in section Access Specifiers of Object Oriented Programming |
|
Answer» RIGHT option is (d) PUBLIC Explanation: It is always advised that the member functions should be kept public so that those functions can be USED from out of the class. This is USUALLY DONE to ensure that the features provided by the class can be used at its maximum. |
|