What is operator overloading? Give Example
Answer Posted / xxxx
A single operator is used to perform diff fuction in a
program is known as operator overloading..
Operator overloading is an operator that perform different
task based on given arguments.
e.g. suppose '+' is an operator is used to add two number
and if we use '+' with two strings then operator '+' can
concate two string is known as operator overloading.
or
operator overloading means one operator can perform multiple
operation based on given arguments.
Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
to find out the minimum of two integer number of two different classes using friend function
Write a program to sort the number with different sorts in one program ??
What is encapsulation c#?
Is enum a class?
Is abstract thinking intelligence?
class type to basic type conversion
What is advantage of inheritance?
Why is abstraction needed?
What is debug class?what is trace class? What differences are between them? With examples.
Following are the class specifications: class {int a}; class {int b}; Using friend funtion,calculate the max of two objects and display it.
what's the basic's in dot net
What is abstraction in oops with example?
Which is better struts or spring?
There are two base class B1,B2 and there is one class D which is derived from both classes, Explain the flow of calling constructors and destructors when an object of derived class is instantiated.
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?