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 will strcmp("Astring", "Astring"); return a) A positive value b) A negative value c) Zero

647


What is the standard template library (stl)?

639


What is c++ & why it is used?

600


Differentiate between an external iterator and an internal iterator?

580


In which header file does one find isalpha() a) conio.h b) stdio.h c) ctype.h

691






What is an adaptor class in c++?

614


Which of the following is evaluated first: a) && b) || c) !

1822


How can you quickly find the number of elements stored in a dynamic array? Why is it difficult to store linked list in an array?

570


Explain linked list using c++ with an example?

643


What is the best book for c++ beginners?

590


Write a Program for dynamically intialize a 2 dimentional array. Eg:5x20, accept strings and check for vowels and display the no.finally free the space allocated .

703


Describe about storage allocation and scope of global, extern, static, local and register variables?

746


What is a hash function c++?

561


Why is the function main() special?

634


What is private inheritance?

608