What is the use of static functions?

Answer Posted / khan

Static member functions give internal linkage. The function
declared as static is not visible outside the file in which
it is declared. It is not associated with "this" pointer and
it can be invoked using class name instead of depending on
individual object. It can access only static members of the
class.

Is This Answer Correct ?    13 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the various operations performed on stack?

631


What are libraries in c++?

609


How do you find out if a linked-list has an end?

652


Is c++ the hardest language?

565


What is the output of the following program? Why?

624






What is the main function c++?

604


True or false, if you keep incrementing a variable, it will become negative a) True b) False c) It depends

1867


What are the new features that iso/ansi c++ has added to original c++ specifications?

588


What is the benefit of c++?

603


Difference between pointer to constant vs. Pointer constant

585


Out of fgets() and gets() which function is safe to use?

643


Explain the difference between using macro and inline functions?

578


What is endl c++?

606


Can you pass a vector to a function?

539


How can you quickly find the number of elements stored in a static array?

640