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 is the difference between = and == in C?

20 Answers   Christ University, Intel,


Is recursion allowed in inline functions?

0 Answers  


Evaluate the following expression as C++ would do :8 * 9 + 2 * 5 a) 82 b) 79 c) 370 d) list

0 Answers  


What are C++ inline functions?

1 Answers  


What is expression parser in c++

0 Answers   Mphasis,


What is double in c++?

0 Answers  


Which operator can not be overloaded in C++?

1 Answers  


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

0 Answers  


Why do we use classes in programming?

0 Answers  


What is encapsulation in c++ with example?

0 Answers  


Is c++ primer good for beginners?

0 Answers  


What is the best c++ compiler?

0 Answers  


Categories