Difference between over loading and over ridding?

Answer Posted / manav sharma

Overloading: Same function or operator responds differently
on different types on inputs. This is done by defining a
function (including operator fn() definition) with the same
name but different argument list.

Overriding: Redefining any base class function in a
derieved class to work differently than what is defined in
the base class. So, now the same function called with same
argument list will behave differently when called on the
objects of base and derieved class.

Important: Which instance of function to bind with the
object depends on the type of object on which the function
is called and is decided on compile time. This is also
called early binding or compile time polymorphism.

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why is object oriented programming so hard?

612


What is a function in oop?

627


What is encapsulation and abstraction? How are they implemented in C++?

632


I have One image (means a group photo ) how to split the faces only from the image?............ please send the answer nagadurgaraju@gmail.com thanks in advace...

1622


Can we define a class within the interface?

551






What are the data types in oop?

600


What is polymorphism in oop example?

513


What is the use of oops?

617


What is encapsulation in ict?

601


Can you explain polymorphism?

576


Hi friends I have experience of 6 months in website design and maintanence. Now i am looking for other IT jobs.. to switch platform. please post any interview you know in chennai.

1780


Write A Program to find the ambiguities in Multiple Inheritance? How are they resolved.(Virtual Functions)

3550


What is a class in oop?

596


What is interface in oop?

658


What is abstraction in oop with example?

642