1.

How can static member function can be accessed directly in main() function?(a) Dot operator(b) Colon(c) Scope resolution operator(d) Arrow operatorI got this question by my college director while I was bunking the class.This interesting question is from Types of Member Functions topic in chapter Member Functions & its Types of Object Oriented Programming

Answer»

The correct option is (C) Scope resolution operator

The explanation is: The static MEMBER functions can be accessed directly in the main() function. The only restriction is that those must use only static data MEMBERS of the CLASS. These functions are property of class RATHER than each object.



Discussion

No Comment Found

Related InterviewSolutions