can a particular operator be used to mean more that one thin

can a particular operator be used to mean more that one thing ? if so, how dose the compiler know which form of the operator to use ?

Solution

Yes a particular operator can be made todo more than one task .this is called operator or method overloading in high level programming languages.

During compile time for method overloading the compiler comapres the dataype of the arguments passed and then determines the method to be called accordingly.

Similarly operator is also compared to call the corresponding overloaded operator method .

After call the compiler substitutes the executable code of those methods selected in sequence with other statements.

can a particular operator be used to mean more that one thing ? if so, how dose the compiler know which form of the operator to use ?SolutionYes a particular op

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site