Answer Posted / v venkatesh
The differences between a static member function and non-
static member functions are as follows.
A static member function can access only static member
data, static member functions and data and functions
outside the class. A non-static member function can access
all of the above including the static data member.
A static member function can be called, even when a class
is not instantiated, a non-static member function can be
called only after instantiating the class as an object.
A static member function cannot be declared virtual,
whereas a non-static member functions can be declared as
virtual
A static member function cannot have access to the 'this'
pointer of the class.
The static member functions are not used very frequently in
programs. But nevertheless, they become useful whenever we
need to have functions which are accessible even when the
class is not instantiated.
Is This Answer Correct ? | 70 Yes | 6 No |
Post New Answer View All Answers
Explain unexpected() function?
What is the difference between global variables and local variable
Is dev c++ a good compiler?
Write my own zero-argument manipulator that should work same as hex?
Why should we use null or zero in a program?
What is the difference between an external iterator and an internal iterator? Describe an advantage of the external iterator.
What are c++ templates used for?
What is a map in c++?
Is linux written in c or c++?
Write a program which uses functions like strcmp(), strcpy()? etc
Is c++ used anymore?
I want explanation for this assignment: how to connect mysql database using c/c++,please explain this detailly?
which one is equivalent to multiplying by 2:Left shifting a number by 1 or Left shifting an unsigned int or char by 1?
You run a shell on unix system. How would you tell which shell are you running?
Are strings mutable in c++?