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
Why is abstraction used?
to find out the minimum of two integer number of two different classes using friend function
What is the real time example of encapsulation?
write a program using c++ to implement single contiguous memory mangement techniques.display the content of the main memory after yhe allocation of jobs and percentage of the wastage of the main memory
What is meant by multiple inheritance?
What is interface? When and where is it used?
what type of question are asked in thoughtworks pair programming round ?
Can a varargs method be overloaded?
Write A Program to find the ambiguities in Multiple Inheritance? How are they resolved.(Virtual Functions)
What is polymorphism and its types?
if i have same function with same number of argument but defined in different files. Now i am adding these two files in a third file and calling this function . which will get called and wht decide the precedence?
What is for loop and its syntax?
What do you mean by abstraction?
What is a class oop?
Why is polymorphism important in oop?