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 is #include iomanip?

793


Is swift faster than c++?

785


Can we get the value of ios format flags?

886


Explain the pure virtual functions?

874


What is unary operator? List out the different operators involved in the unary operator.

810


What are the advantages of inheritance in c++?

895


How are Structure passing and returning implemented by the compiler?

873


What is a static member?

841


What are the types of container classes?

845


Do you need a main function in c++?

855


Do you know what are the new features that iso/ansi c++ has added to original c++ specifications?

820


What is function overloading in C++?

1134


What is a vector c++?

873


When can I use a forward declaration?

848


How important is c++?

751