1.

We can use the static member functions and static data member __________________(a) Even if class object is not created(b) Even if class is not defined(c) Even if class doesn’t contain any static member(d) Even if class doesn’t have complete definitionThis question was addressed to me during an online exam.The doubt is from Static Member Functions topic in division Exception Handling & Static Class Members of Object Oriented Programming

Answer» CORRECT option is (a) Even if class OBJECT is not created

Explanation: The static MEMBERS are property of class as a whole. There is no NEED of specific objects to call static members. Those can be called directly or with class name.


Discussion

No Comment Found

Related InterviewSolutions