What is the difference between "overloading" and "overridding"?
Answer Posted / shakti singh khinchi
Overloading: When more then 1 methods in a class having same
name but they are different in their number of parameters,
different in their parameters types and their order.
Overriding: When a parent class is derived by a child class
and some method which has present in parent class which is
declared as "virtual" in parent class , same method with
same name and parameters and sam type is also declared in
child class without "virtual" keyword, bcz it is by default
virtual in child. SO PARENT AND CHILD CLASS USES SAME METHOD
ARE CALLED OVERRIDING.
| Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
What is the use of "new" operator?
Should I learn c++ c?
Write a note about the virtual member function?
What is a map in c++?
What is polymorphism & list its types in c++?
If we want that any wildcard characters in the command line arguments should be appropriately expanded, are we required to make any special provision? If yes, which?
What are the general quetions are in DEna bank manager IT/System interviews?
Explain the uses oof nested class?
What is the cout in c++?
What is protected inheritance?
What is tellg () in c++?
Can you help me with this one? Make a program that when a user inputed a Product Name, it will display its price, and when the user inputed the quantity of the inputed product, it will show its total price. The output must be like this: Product Name: Price: Quantity: Total Price: ..this is the list of products to be inputed: Cellphone - 1500 Washing Machine - 5200 Television - 6000 Refrigirator - 8000 Oven - 2000 Computer - 11000 thanks..:D
What c++ is used for?
What is using namespace std in c++?
What are dynamic type checking?