Search This Blog

Translate

accept 5 string from user and display using pointer

accept 5 string from user and display using pointer

#include"stdio.h"
#include"conio.h"
void main()
{
int i;
char *name1[5];
clrscr();
for(i=0;i"5;i++)
{
printf("\n\nEnter %d name=",i+1);
scanf("%s",name1[i]);
}
     for(i=0;i"5;i++)
{
printf("\n\n%d name is= %s",i+1,name1[i]);
}
getch();
}

accept 5 string from user and display using pointer

C Program example List

Google+ Badge