Difference between Overloading and Overriding?
Answer Posted / manu chaudhary
overloading- having different functions with same function_names but must have different signatures(parameters).
overriding- if a base class have a member function and its derived class also have a member function with same name and signature then when that same name function is called in the main function with the object of derived class then the function in the derived class is called that means the function with sam ename in the base class overrides, and this is known as function overriding.
If you have to call the function of the base class then you can call it within the scope of derived class function by using ::(scope resolution) operator.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is function overloading c++?
In a function declaration, what does extern mean?
What is the need of a destructor? Explain with the help of an example.
What are maps in c++?
How long does it take to get good at leetcode?
Why is the function main() special?
How can an improvement in the quality of software be done by try/catch/throw?
What is general format for a prototype?
What is a storage class? Mention the storage classes in c++.
What is the best it certification?
What flag means?
Explain the uses oof nested class?
Is c++ slower than c?
What is the use of cmath in c++?
Can we use this pointer in a class specific, operator-overloading function for new operator?