what is static function

Answers were Sorted based on User's Feedback



what is static function..

Answer / 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

what is static function..

Answer / aavesh yadav

Static functions are functions which can access only static
variables and local variables.It can be called by class
name bcoz it is specific for a class in which it is
defined,not for any specific object of that class.It can
not be inherited also.

Is This Answer Correct ?    7 Yes 4 No

Post New Answer

More C++ General Interview Questions

What are the methods of exporting a function from a dll?

0 Answers  


What is data abstraction? How is it different from data encapsulation?

0 Answers  


Is c++ proprietary?

0 Answers  


How much is c++ certification?

0 Answers  


What are exceptions c++?

0 Answers  






Write a program to find the Fibonacci series recursively.

0 Answers   Huawei,


What are the difference between reference variables and pointers in C++?

1 Answers  


What are the types of STL containers?

4 Answers  


What is size of null class?

6 Answers   HP,


I need to find a specific string between two strings how do I do it?

1 Answers   Infosys,


What are raw sockets, where they are efficient?

2 Answers   Symphony,


Describe the role of the c++ in the tradeoff of safety vs. Usability?

0 Answers  


Categories