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
Explain public, protected, private in c++?
How is new() different from malloc()?
Explain some examples of operator overloading?
What c++ is used for?
What is c++ iterator?
What is flush c++?
What does std mean in c++?
What is c++ stringstream?
What is singleton class in c++?
What is this weird colon-member (" : ") syntax in the constructor?
What does count ++ do in c++?
How do you add an element to a set in c++?
Is empty stack c++?
Which is not an ANSII C++ function a) sin() b) tmpnam() c) kbhit()
Explain "const" reference arguments in function?