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 |
Explain the concept of abstracion and encapsulation with one example. What is the difference between them?
explain sub-type and sub class? atleast u have differ it into 4 points?
What is constructor in oop?
Why a "operator=(...)" when there is a copy ctor?
diff between Virtual mathod and abstract method?
Name a typical usage of polymorphism
What is persistence in oop?
How to handle exception in c++, For example in a functions i am assigning memory to some variables and also in next instructions in am dividing one variable also. If this functions generates a error while allocating memory to those variable and also while dividing the variable if i divide by zero then catch block how it will identify that this error has cone from perticular instruction
Why do we use virtual functions?
20% of a 6 litre solution and 60% of 4 litre solution are mixed what the % of mixture of solution it is resulted into?
WHY FUCTION OVERLOADING DOSENOT RETURN A RETEN TYPE
write a program to find 2^n+1 ?