InterviewSolution
Saved Bookmarks
| 1. |
The static member functions __________________(a) Have access to all the members of a class(b) Have access to only constant members of a class(c) Have access to only the static members of a class(d) Have direct access to all other class members alsoI have been asked this question in class test.This intriguing question originated from Static Member Functions topic in portion Exception Handling & Static Class Members of Object Oriented Programming |
|
Answer» CORRECT answer is (c) Have access to only the static members of a CLASS The explanation is: The static member functions are common for all the objects. These functions can use only the static members of a class in which those are defined. This is because other members CHANGE with respect to each object CREATED. |
|