What is an overloaded operator?I have heard sir use this word a lot for operations in string class.
What is an overloaded operator?
hi @Nitin-Bhattacharyya-2319140631658033 operator overloading refers to when an operator can do different things, in different contexts.
For example, if you use + operator with 2 integers, it will sum them up.
But if you use + operator with 2 strings, it will concatenate them.
So + operator is behaving differently in different scenarios and that is called operator overloading.
You will learn about overloading in detail in the OOPs section.
Thanks for the explanation,I will mark it as resolved
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.