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

Search for: what is pair in c++?

0 Answers  


What is virtual destructors? Why they are used?

1 Answers  


To which numbering system can the binary number 1101100100111100 be easily converted to?

0 Answers  


What is endianness?

0 Answers  


Can a program run without main in c++?

0 Answers  


List out function which we can call without using object

1 Answers  


What is a "Copy Constructor"?

2 Answers  


What is a friend function in c++?

2 Answers  


Explain about Garbage Collector?

0 Answers  


What is dynamic and static typing?

0 Answers  


How would perform Pattern Matching in C++?

0 Answers   Genpact,


Explain the differences between list x; & list x();.

0 Answers  


Categories