What is function overloading and operator overloading?
Answer Posted / jerry
function overloading - function name will be same but
operation will be different for eg:
if we take the function as area
then 1. area(int x,int y)
2. area(int x);
these r the two functions with the same name but
they will differ by their arguments given
for the 1st function
it becomes the area of the rectangle=x*y
for the 2nd function it becomes the area of square=x*x
coming to the operator overloading,
it is an overloading function of an operator.
if we + as an operator
a+b then + is operator for the operands a,b
c+d then + is also an poperator for the c,b.
these r the two properties of polymorphism.
| Is This Answer Correct ? | 53 Yes | 12 No |
Post New Answer View All Answers
They started with the brief introduction followed by few basic C++ questions on polumorphism, inheritance and then virtual functions. What is polymorphims? How you will access polymorphic functions in C? How virtual function mechanism works?
Get me an image implementation program.
what is the sylabus for priliminaries?
Why is there no multiple inheritance?
What is abstraction in oops with example?
How many human genes are polymorphic?
What is the importance of oop?
What is super in oop?
What are the three parts of a simple empty class?
Why it is called runtime polymorphism?
Is html an oop?
Please send ford technologies placement paper 2 my mail id
Where You Can Use Interface in your Project
What is basic concept of oop?
What is abstraction in oops?