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
Program to check whether a word is a sub-string or not of a string typed
What is #include iostream?
What are put and get pointers?
Why use of template is better than a base class?
Why was c++ made?
What are the various compound assignment operators in c++?
program explaining feautures of c++
Write a struct time where integer m, h, s are its members?
Write about the access privileges in c++ and also mention about its default access level?
Which command properly allocates memory a) char *a=new char[20]; b) char a=new char[20]; c) char a=new char(20.0);
What are the restrictions apply to constructors and destructors?
What is std :: flush?
How many types of comments are there in c++?
What is c++ namespace?
What is a dynamic binding in c++?