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 the use of c++ programming language in real life?

569


Write a program which employs Recursion

735


Why do we need runtime polymorphism in c++?

561


What is heap sort in c++?

606


What can I safely assume about the initial values of variables which are not explicitly initialized?

627






Is facebook written in c++?

564


How does a copy constructor differs from an overloaded assignment operator?

560


Why is main function important?

588


Is c++ used anymore?

598


What is a Default constructor?

924


What is abstract keyword in c++?

594


Do inline functions improve performance?

650


What does I ++ mean in c++?

585


What is the difference between a declaration and a definition?

584


What is nested class in c++?

522