Friday 12 July 2013

Use of Function Overloading Character

#include<iostream.h>
#include<conio.h>
void display(char []);
void display(char [], char []);

void main()
{
   char name[] = "MaHi";
   char surname[] = "Babariya";
   clrscr();

   display(name);
   display(name, surname);

   getch();
}

void display(char s[])
{
   cout << s << endl;
}

void display(char s[], char t[])
{
   cout << s << "\t" << t << endl;
}


Here is the output :)))

 

No comments:

Post a Comment