Live example for static function?



Live example for static function?..

Answer / 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

More C++ General Interview Questions

What do you mean by internal linking and external linking in c++?

1 Answers  


Explain selection sorting?

0 Answers  


How do you allocate and deallocate memory in C++?

1 Answers  


Explain what is oop?

0 Answers  


Explain operator overloading.

0 Answers  






Describe the role of the c++ in the tradeoff of safety vs. Usability?

0 Answers  


What are the advantages of c++?

0 Answers  


Is c the same as c++?

0 Answers  


What is an adaptor class or wrapper class in c++?

0 Answers  


What is increment operator in c++?

0 Answers  


What is cloning?

1 Answers  


What is the exit function in c++?

0 Answers  


Categories