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
Explain virtual destructor?
Explain terminate() and unexpected() function?
What is a catch statement?
What is the difference between strcpy() and strncpy()?
What are protected members in c++?
How many standards of c++ are there?
Tell me what are static member functions?
What are the uses of static class data?
State the difference between pre and post increment/decrement operations.
What is expression parser in c++
Write a program for Divide a number with 2 and Print the output ( NOTE: Check for divide by zero error).
Differentiate between a constructor and a method in C++.
What is constructor in C++?
program explaining feautures of c++
How did c++ start?