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 function overloading and operator overloading?
can we make a class static without using static keyword?
What is encapsulation selenium?
In multiple inheritance , to create sub class object , is there need to create objects for its superclasses??? in java and c++ both. Actually i have some information that is , all available members from its superclasses , memory created in subclass obj , so no need to create object for its superclasses...??? Thanks in Advance
explain sub-type and sub class? atleast u have differ it into 4 points?
what is virtual destructor
DIFFRENCE BETWEEN STRUCTURED PROGRAMING AND OBJCET ORIENTED PROGRAMING.
how can we design a magic square in c++?or suggest me the basic idea of it.
What is encapsulation with real life example?
What is data binding?
How is class defined?
WAP to find the ambiguities in Multiple Inheritance? How are they resolved.(Virtual Functions)