98.9k views
1 vote
Is the following example an overloaded operator? Why? struct { string product; float price; } a, b, c; a = b + c;

User NoOutlet
by
6.1k points

1 Answer

5 votes

Answer:

No.

Step-by-step explanation:

Operator overloading means increasing the functionality of an operator so that it can work beyond what is originally designed for.To implement operator overloading we user operator keyword.It is supported only in C++ not in C.

There is no operator keyword used in the code.Hence there is no operator overloading.

Syntax:-

Class_name operator (operator symbol) (parameter)

{

definition

}

User Hargrovm
by
6.1k points