What is operator overloading and function overloading?
Answers
Answered by
7
Function Overloading is defined as the process of having two or more function with the same name, but different in parameters is known as function overloading in C++. In function overloading, the function is redefined by using either different types of arguments or a different number of arguments.
Answered by
2
The explanation of Operator overloading and function overloading is given below.
Explanation:
operator overloading
- In the operator overloading it is used to achieve polymorphism in this the operator is an overload in order to give the programmer a defined sense.
- The operator overloading concept is implemented in the user-defined datatype.
- For example The + operator will be used in a string as well as in integer.
- Unary operator overloading and binary operator overloading are the two types of operator overloading.
function overloading
- Function having the same name with the different parameters then this type of phenomenon is known as function overloading.
- To achieve the compile-time binding we have used the concept function overloading.
- For example void gr(),int gr(int b).In this function both the function have the same name i.e gr but the argument is different.
Learn More:
- https://brainly.in/question/10487133
- https://brainly.in/question/3416109
Similar questions
Math,
6 months ago
Math,
6 months ago
Psychology,
1 year ago
Math,
1 year ago
Social Sciences,
1 year ago