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
Can we get the value of ios format flags?
What is auto type c++?
What does new return if there is insufficient memory to make your new object?
What is the oldest programming language?
Can we change the basic meaning of an operator in c++?
what is Loop function? What are different types of Loops?
Why do we use using namespace std in c++?
What is a null object in c++?
How can you quickly find the number of elements stored in a static array?
Is there a c++ certification?
Why c++ is faster than java?
What function initalizes variables in a class: a) Destructor b) Constitutor c) Constructor
What is the difference between the functions memmove() and memcpy()?
What does std mean in c++?
Which sort does c++ use?