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 happens if a pointer is deleted twice?

788


Can we distribute function templates and class templates in object libraries?

591


Write a program using GUI concept for the scheduling algorithms in Operating system like SJF,FCFS etc..

3358


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

583


What are the two types of polymorphism?

591






What is a forward referencing and when should it be used?

576


Can I create my own functions in c++?

600


Ask to write virtual base class code?

2149


What is a tree in c++?

563


What is an adaptor class or wrapper class in c++?

607


What does the ios::ate argument do?

663


What is a class template?

589


How does atoi function work?

624


Write is a binary search tree? Write an algo and tell complexity?

595


Comment on c++ standard exceptions?

638