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
what type of questions
What are properties in oop?
Why is polymorphism needed?
Can we override main method?
write knight tour problem which is present in datastructure
What is meant by oops concept?
Which method cannot be overridden?
i am getting an of the type can not convert int to int *. to overcome this problem what we should do?
What is overloading and its types?
What is class encapsulation?
Is html an oop?
2. Give the different notations for the class.\
How to handle exception in c++, For example in a functions i am assigning memory to some variables and also in next instructions in am dividing one variable also. If this functions generates a error while allocating memory to those variable and also while dividing the variable if i divide by zero then catch block how it will identify that this error has cone from perticular instruction
How to use CMutex, CSemaphore in VC++ MFC
What makes a language oop?