1.

Which among the following is true?(a) Static member functions can be overloaded(b) Static member functions can’t be overloaded(c) Static member functions can be overloaded using derived classes(d) Static member functions are implicitly overloadedThe question was posed to me in class test.The origin of the question is Static Member Functions topic in chapter Exception Handling & Static Class Members of Object Oriented Programming

Answer»

The correct choice is (b) Static MEMBER functions can’t be OVERLOADED

The explanation is: The static member functions can’t be overloaded because the definition MUST be the same for all the instances of a class. If an overloaded FUNCTION have many definitions, none of them can be made static.



Discussion

No Comment Found

Related InterviewSolutions