1.

The static member functions _______________(a) Can’t be declared const(b) Can’t be declared volatile(c) Can’t be declared const or volatile(d) Can’t be declared const, volatile or const volatileI have been asked this question in my homework.This is a very interesting question from Static Member Functions in portion Exception Handling & Static Class Members of Object Oriented Programming

Answer»

Right OPTION is (d) Can’t be DECLARED const, volatile or const volatile

For explanation: The static member functions can’t be made const, since any object or class itself should be capable of MAKING CHANGES to the function. And the function must RETAIN all changes common to all the objects.



Discussion

No Comment Found

Related InterviewSolutions