Answer Posted / sachinmundhra
Live Example for static function is Singleton class.
Static Method is used and called to get the instance of
class.
class Base
(
private:
Base()
public:
static Base* GetObject() // This is a static method
};
Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
What is a terminating character in c++?
Can constructor be private in c++?
What is the use of main function in c++?
Are strings mutable in c++?
What is function overriding in c++?
Is recursion allowed in inline functions?
Explain how the virtual base class is different from the conventional base classes of the opps.
Explain what happens when a pointer is deleted twice?
What are the classes in c++?
Are php strings immutable?
What is the use of register keyword with the variables?
Explain the extern storage classes in c++.
Difference between declaration and definition of a variable.
What is input operator in c++?
What is the need of a destructor? Explain with the help of an example.