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 |
How is data security provided in Object Oriented languages? ?
If a=5, b=6, c=7, b+=a%c*2. What is the final value of b?
What is overloading in oop?
What is difference between abstraction and encapsulation?
How is exception handling carried out in c++?
what i oops concept, how many languages supports oops concept?
What are the advantages of inheritance?
26 Answers IBS, TCS,
write a program to print * * * * * *
In OverLoading concept,Why they are not consider return value and why they are consider only parameters in method? For ex: public int Add(int a,int b){...} public String Add(int a,int b){...}
Difference between realloc() and free?
What is the types of inheritance?
What are virtual classes?