Sunday, 20 January 2013

Function Overloading


By on 00:03

Function Overloading(Overload Function) is a method of calling more than one function  by the same name or in simple word overloading means use of same thing for different work.

Function overloading calls several function by the same name but different no. of arguments and different no. of data types.Function overloading can be done in c ++,java,c# etc.

Example-Some examples/program samples are:-

1)int add(int,int,int);
void add();
float add(float,float);

2)int subtract(int,int);
void subtract();

3)char minimum(char,char);
int minimum(int,int);
float minimum(float,float);

4)char max(char,char);
int max(int,int);
float(float,float);

5)void multiply();
int multiply(int,int);
float multiply(float,float);



If you have any query then leave your comments and don't forgot to follow me on Google+,Facebook,Twitter.

0 comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...