Wednesday, 20 February 2013

array of pointer


#include<iostream.h>
#include<conio.h>
void sort(char *name[],const int size);
void main()
{
char *name[]={"saurabh","amit","sushant","rohan"};
sort(name,4);
getch();
}
void sort(char *name[],const int size)
{ clrscr() ;
for(int i=0;i<size;i++)

cout<<name[i]<<"\t";
}

No comments:

Post a Comment