what is static function

Answer Posted / anil bisht

Static member functions have a class scope and they do not
have access to the 'this' pointer of the class. When a
member is declared as static, a static member of class, it
has only one data for the entire class even though there are
many objects created for the class. The main usage of static
function is when the programmer wants to have a function
which is accessible even when the class is not instantiated.

Is This Answer Correct ?    19 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is const pointer and const reference?

598


What is a storage class used in c++?

619


What is a template in c++?

639


What is #include ctype h in c++?

669


Will the following program execute?

565






Explain the concept of dynamic allocation of memory?

619


What do you mean by public protected and private in c++?

605


What is an accessor in c++?

623


Can we specify variable field width in a scanf() format string? If possible how?

666


How do I run c++?

579


Describe private, protected and public – the differences and give examples.

590


How do I use turbo c++?

552


What is the standard template library (stl)?

627


How a new operator differs from the operator new?

626


How is objective c different from c++?

796