Difference between Overloading and Overriding?
Answer Posted / ranjana chakraborty
Overloading Vs. Overriding
Overloading is nothing but static binding.
Overriding is dynamic binding which will be resolved at run-time.
Overloading deals with multiple methods in the same class with the same name but different signatures.
Overriding deals with two methods, one in a parent class and one in a child class, that have the same signature.
Overloading lets you define a similar operation in different ways for different data.
Overriding lets you define a similar operation in different ways for different object types.
| Is This Answer Correct ? | 7 Yes | 0 No |
Post New Answer View All Answers
How do you define a class in c++?
Program to check whether a word is a sub-string or not of a string typed
Describe the advantages of operator overloading?
write a corrected statement so that the instruction will work properly. if (4 < x < 11) y = 2 * x;
Where can I run c++ program?
What is the prototype of printf function?
Is recursion allowed in inline functions?
Which of the following is not a valid declaration for main() a) int main() b) int main(int argc, char *argv[]) c) They both work
What is recursion?
What is a list c++?
Write about the local class and mention its use?
What do the keywords volatile and mean mutable?
Explain the difference between struct and class in terms of access modifier.
what is the difference between overloading & overriding? give example.
Explain the different access specifiers for the class member in c++.