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 |
What is a linked list?
what is multi level inheritance give n example ?
13 Answers HDFC, Hulas Steel, Ness Technologies,
What is R T T I ?
Why is static class not inherited?
diff between Abstract class Interfaces?
What is oops in programming?
What is deep and shalow copy?
What is object and example?
what is the application of oops?
what is difference between String s=new String("vali"); String s="vali"
Give an example where we have to specifically use C programming language and C++ programming language cannot be used?
what are the different types of qualifier in java?