Why static Function is used in C++?
Answers were Sorted based on User's Feedback
Answer / sujai cn
Static functions are used to perform the tasks which are
independent of the state of object or to perform class wide
functions ex. to count the number of instaces (objects) are
there in existence.
| Is This Answer Correct ? | 14 Yes | 1 No |
Answer / rafiuddin
static functions can be called with out the class object
also. we can call static functions with scope resulation
operator.
| Is This Answer Correct ? | 9 Yes | 1 No |
Answer / mugdha taru
Because it is the only function which is accessible even
when class is not instantiateed
| Is This Answer Correct ? | 6 Yes | 3 No |
Answer / mugdha taru
Because it is the only function which is accessible even
when class is not instantiateed
| Is This Answer Correct ? | 2 Yes | 2 No |
write a c++ program to find maximum of two numbers using inline functions.
How long to learn object oriented programming?
Write a program to get the binary tree.
We have a scale and 7 balls. 1 ball is heavier than all the rest. How to determine the heaviest ball with only 3 possible weighing attempts?
What is destructor in oop?
What is polymorphism used for?
what are the ways in which a constructors can be called?
WHY FUCTION OVERLOADING DOSENOT RETURN A RETEN TYPE
c++ is a purely oop concept?
What are the benefits of interface?
Write a program to demonstrate the use of 'Composition' in C++
INSTANCE FIELDS DECLARED private ARE ACCESSIBLE BY THE METHODS ONLY.CAN WE CHANGE THE private FIELD OF AN OBJECT IN A METHOD OF SOME OTHER OBJECT OF THE SAME CLASS?