Which statement is correct about static member function in C++?
Which statement is correct about static member function in C++?
I. It can access to only other static members declared in the same class.
II. It cannot be called using the class name (instead of its objects)
Show answerHide answer
Correct answer: (A) Only I
Explanation
A static member function can access only static members of its class, and it can be called with the class name (Class::f()). So only I is correct.