Difference between Overloading and Overriding?
Answer Posted / shoaib
1. Overloading doesn't block inheritence from the
superclass where as Overriding blocks inheritance.
2. Overloading -> If two functions having same name and return type, but with different type and/or number of arguments. Overriding -> When a function of base class is re-defined in the derived class
3. Overloading is compile time binding, where as overriding is dynamic binding
4. In overloading function name are same but signatures
parameters are different .while in overriding function name are as well as argument are same in drive class as in super class.
| Is This Answer Correct ? | 9 Yes | 2 No |
Post New Answer View All Answers
What is a class definition?
Why c++ does not have finally?
Is map thread safe c++?
Define the operators that can be used with a pointer.
What is the latest c++ standard?
How can virtual functions in c++ be implemented?
Explain pass by value and pass by reference.
What is static in c++?
How do you establish an is-a relationship?
Explain deep copy and a shallow copy?
When you overload member functions, in what ways must they differ?
What is difference between class and structure in c++?
What is c++ map?
What do you mean by late binding?
What is dev c++ used for?