Which specifier should be used for member functions of a class?

Đức Linh

New member
Which specifier should be used for member functions of a class?
A. Private
B. Default
C. Protected
D. Public
 
Answer: d
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.
 

Tìm kiếm

Back
Top