What is operator overloading? Give Example
Answer Posted / riya piyush jain
Operator overloading (less commonly known as operator ad-
hoc polymorphism) is a specific case of polymorphism in
which some or all of operators like +, =, or == have
different implementations depending on the types of their
arguments. Sometimes the overloadings are defined by the
language; sometimes the programmer can implement support
for new types.
Is This Answer Correct ? | 23 Yes | 1 No |
Post New Answer View All Answers
Why can't we have instance(stack) of a class as a member of the same class like eg.Class A{A obj;} as we can have self refential pointer
Why we use classes in oop?
What is inheritance in simple words?
what is different between oops and c++
when to use 'mutable' keyword and when to use 'const cast' in c++
What is overloading and its types?
Can a varargs method be overloaded?
Why do we use inheritance?
Whats is abstraction in oops?
write a program that takes input in digits and display the result in words from 1 to 1000
Is oop better than procedural?
What is the important feature of inheritance?
Why do we use class in oops?
What type of loop is a for loop?
What is abstraction encapsulation?