What is operator overloading? Give Example
Answer Posted / palsaniya sadikhasan, meta.
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 ? | 39 Yes | 2 No |
Post New Answer View All Answers
What is byval and byref? What are differences between them?
Is data hiding and abstraction same?
Write a program to reverse a string using recursive function?
What is meant by multiple inheritance?
What is difference between abstraction and encapsulation?
Explain virtual inheritance?
Why is oop useful?
what is graphics
What are oops functions?
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.
How do you define a class in oop?
What is abstraction in oops with example?
Which language is not a true object oriented programming language?
What is the difference between a mixin and inheritance?
Can you explain polymorphism?