Sunday, February 27, 2011

Function Overloading

#include<iostream.h>
#include<conio.h>
 void fun()
 {
 cout<<"\n Function 1";
 }

 void fun(int i)
 {
 cout<<"\n Function 2";
 }
 void fun(char c)
 {
 cout<<"\n Function 3";
 }
 void main()
 {
 clrscr();
 fun();
 fun(10);
 fun('w');
 }



No comments:

Post a Comment