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
How do you decide which integer type to use?
What are the four partitions in which c++ compiler divides the ram?
What are references in c++?
How do you declare A pointer to a function which receives nothing and returns nothing
Explain the use of virtual destructor?
What is a string example?
Why do we use double in c++?
Is python written in c or c++?
When is dynamic checking necessary?
What are static and dynamic type checking?
What is public, protected, private in c++?
Can you explicitly call a destructor on a local variable?
Explain what is class definition in c++ ?
What is dev c++ used for?
Define a constructor - what it is and how it might be called (2 methods)?