What is function overloading and operator overloading?

What is function overloading and operator overloading?

Diff are there: 
Function overloading: 
              C++ defines a same name of the fuctions are in diff set of paprameters.as long as the type is concerned. This capability is called function overloading. When an overloaded function is called, the C++ compiler selects the proper function by examining the number, types and order of the arguments in the call. Function overloading is commonly used to create several functions of the same name that perform similar tasks but on different data types.
Operator overloading :
               Operator Overloading works on objects of user defned classes becouseits alows existing C++ operators to be redefined .Overloaded operators are syntactic sugar for equivalent function calls. They form a pleasant facade that doesn't add anything fundamental to the language.

By:Umang
Date:2003-01-09 00:00:00

Post Your Answers


User Email:

User Name:
Answers:

Related C Subjective Links

C Subjective interview questions and answers for experienced and fresher