Which statement about a static member function is true?
-
A
It may read any non-static member
-
B
It must be called through an object
-
C
It is copied once per object
-
D
It has no this pointer at all
Correct answer
Correct answer
D. It has no this pointer at all
15 views
Explanation
A static member function is not bound to any object, so it receives no this pointer.
Reference
Asked in: NTS, PPSC IT, Campus Interviews
Doubts & discussion
Not sure why the answer is D? Ask here and get an explanation.
Ask a doubt about this MCQ