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
How does code-bloating occur in c++?
Which field is used in c++?
declare an array of structure where the members of the structure are integer variable float variable integer array char variable access all elements of the structure using dot operator and this pointer operator
Explain the purpose of the keyword volatile.
Are vectors passed by reference c++?
Define whitespace in C++.
What is the full form of dos?
Define basic type of variable used for a different condition in C++?
What is a container class? What are the types of container classes in c++?
Write about the retrieval of n number of objects during the process of delete[]p?
Is java easier than c++?
Which compiler does turbo c++ use?
What is difference between array and vector in c++?
What is the difference between C and CPP?
What is the arrow operator in c++?