what is static function
Answers were Sorted based on User's Feedback
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 |
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 |
What is using namespace std in cpp?
What are the three types of access specifiers in C++?
What is the use of ‘using’ declaration?
Why Pointers are not used in C++?
How does a C++ structure differ from a C++ class?
Evaluate the following expression as C++ would do :8 * 9 + 2 * 5 a) 82 b) 79 c) 370 d) list
What is setf in c++?
why can't we declare data member of class auto register or extern
What are multiple inheritances (virtual inheritance)?
What is the best c++ book for beginners?
Why for local variables the memory required to hold the variable is allocated from the program stack and for new its allocated from the heap?
What are move semantics?