Write a program that will read names of three students from user


#include<stdio.h>
#include<string.h>
int main()
{

int i;
char sname[3][40];
char yourname[40];
for(i=0;i<3;i++)
{
printf(“Enter the name of the student:n”);
gets(yourname);
strcpy(sname[i],yourname);
}
for(i=0;i<3;i++)
{
puts(sname[i]);

}
return 0;
}