WAP to take N strings from user and print them on output screen

#include<stdio.h>
#include<conio.h>
void main()
{
	int n;
	char a[50][50],i;
	clrscr();
	printf("\nEnter number :");
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		printf("\nEnter Name:");
		scanf("%s",a[i]);

	}
	for(i=0;i<n;i++)
	{
		printf("\nName is : %s",a[i]);
	}
		getch();

}

No comments:

Post a Comment