C program to display entered names using array

#include<stdio.h>
int main()
{
 int i,n;
 char a[100][25];
 printf("Enter the number:-  ");
 scanf("%d",&n);
 printf("Enter the names in array\n");
 for(i=0;i<n;i++)
 {
  scanf("%s",a[i]);
 }
 printf("\nThe names you have entered is:-\n");
 for (i=0;i<n;i++)
 {
  printf("%s\n",a[i]);
 }
}

OUTPUT

C program to display entered names using array

Comments

Popular posts from this blog

C Program for SCAN Disk Scheduling Algorithm | C Programming

C program to Find Cartesian Product of Two Sets | C programming

C Program To Check The String Is Valid Identifier Or Not | C Programming