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

How do you clear a buffer in c++?

723


What is main function in c++ with example?

802


daily Routine of father

1134


Define linked lists with the help of an example.

760


Would you rather wait for quicksort, linear search, or bubble sort on a 200000 element array? (Or go to lunch...) a) Quicksort b) Linear Search c) Bubble Sort

824


What is abstraction in c++?

929


Why would you use pointers in c++?

819


Is c++ the best programming language?

745


What is null and void pointer?

796


What is the best it certification?

819


How do you clear a set in c++?

808


Explain what are mutator methods in c++?

758


Are iterators pointers?

884


What is stl containers in c++?

770


What is c++ good for?

772