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


Please Help Members By Posting Answers For Below Questions

What is inheritance in oop?

605


class type to basic type conversion

1843


Prepare me a program for the animation of train

2005


write a program to find 2^n+1 ?

1555


What is object in oops?

617






Write a program to compute for numeric grades for a course. The course records are in a file that will serve as the input file. The input file is in exactly the following format: Each line contains a student's first name, then one space, then ten quiz scores all on one line. The quiz scores are in whole number and are separated by one space. Your program will take it input from this file and sends it output to a second file. The data in the output file will be exactly the same as the data in the input file except that there will be one additional number (of type double) at the end of each line. This number will be the average of the student's ten quiz scores. Use at least one function that has file streams as all or some of its arguments.

2578


What is the advantage of oop over procedural language?

630


What is difference between data abstraction and encapsulation?

620


What is basic concept of oop?

702


How to hide the base class functionality in Inheritance?

640


What is polymorphism and why is it important?

562


Why is abstraction needed?

571


what is the sylabus for priliminaries?

1691


What is inheritance in simple words?

627


Why is there no multiple inheritance?

572