Difference between Overloading and Overriding?
Answer Posted / janet
1. In overloading,there is a relation ship between methods
available in the same class where as in overridding,there
is relationship between a super class method and subclass
method.
2. overloading doesn't block inheritence from the
superclass where as overridding blocks inheritence.
3. in overloading,seperate methods share the same name
where as in overridding,subclass methods replaces the
superclass.
4.overloading must have different method signatures where
as overriding must have same signature.
| Is This Answer Correct ? | 482 Yes | 79 No |
Post New Answer View All Answers
How do we implement inheritance in c++?
What is a pointer with example?
Does dev c++ support c++ 11?
Difference between struct and class in terms of access modifier.
Is nan a c++?
If a base class is an adt, and it has three pure virtual functions, how many of these functions must be overridden in its derived classes?
What is stoi in c++?
What are containers in c++?
Is map ordered c++?
What is the difference between delegation and implemented-in-terms-of?
Implement stack operations with pointers with appropriate exception checks.
If dog is a friend of boy and boy is a friend of house, is dog a friend of house?
Explain the problem with overriding functions
Describe private, protected and public?
What is the identity function in c++? How is it useful?