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 show the declaration of a virtual constructor?
What is the difference between multiple and multilevel inheritance in c++?
What is the oldest programming language?
A company pays its salespeople on a commission basis. The salespeople receive $200 per week plus 9 percent of their gross sales for that week. For example, a saleperson who sells $5000 worth of merchandise in a week receives $200 plus 9 percent of $5000, or a total of $650. You have been supplied with a list of items sold by each salesperson. The values of these items are as follows: Item Value A 239.99 B 129.75 C 99.95 D 350.89 Write a program that inputs one salesperson's items sold in a week (how many of item A? of item B? etc.) and calculates and displays that salesperson's earnings for that week.
To what does “event-driven” refer?
What is ctime c++?
Is there a c++ certification?
What is a buffer c++?
Distinguish between new and malloc and delete and free().
What is problem with overriding functions?
If all is successful, what should main return a) 0 b) 1 c) void
Explain the differences between private, public and protected and give examples.
Can recursive program be written in C++?
What is a syntax in c++?
Give example of a pure virtual function in c++?