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
How do you show the declaration of a virtual constructor?
Why c++ is better than c language?
How do you save a c++ program?
How to tokenize a string in c++?
What is data abstraction? How is it different from data encapsulation?
What is the purpose of ios::basefield in the following statement?
Do you know the problem with overriding functions?
Is c++ the hardest language?
Can a program run without main in c++?
What is :: operator in c++?
How do you invoke a base member function from a derived class in which you’ve overridden that function?
How does work in c++?
Write about c++ storage classes?
Explain polymorphism?
What is prototype for that c string function?