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 the difference between delegation and implemented-in-terms-of?
What is c++ virtual inheritance?
Function can be overloaded based on the parameter which is a value or a reference. Explain if the statement is true.
Can we use clrscr in c++?
What are friend functions in C++?
Can static member variables be private?
How much is c++ certification?
Explain what is polymorphism in c++?
What is a v-table?
What is the use of this pointer in c++?
What is the c++ programming language used for?
What are register variables?
What is constructor c++?
What is a namespace in c++?
Why are pointers not used in c++?