Difference between Overloading and Overriding?
Answer Posted / samba
Overloading: We can use same method name and different
arguments, number of arguments and type of arguments, and it
is also called as Compiletime Polymorphism, EarlyBinding and
StaticBinding.
Ex: int add(int a,int b);
int add(int a, float b);
float add(int a, float b, float c);
Overriding: We can use same method name and same arguments
to perfrom our own functionality, and it is also called as
Runtime Polymorphism,LateBinding and Dynamic Binding.
Ex: int add(int,int);
int add(int,int);
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
How do you differentiate between overloading the prefix and postfix increments?
What is class definition in c++ ?
What is code reusability in c++?
Can you Mention some Application of C/C++?
Define a nested class.
What is expression parser in c++
Are php strings immutable?
When do we run a shell in the unix system? How will you tell which shell you are running?
If a base class declares a function to be virtual, and a derived class does not use the term virtual when overriding that class, is it still virtual when inherited by a third-generation class?
What is constructor c++?
What is encapsulation in c++ with example?
What is c++ in english?
What is iostream in c++ used for?
When should we use multiple inheritance?
What is fflush c++?