Display name of five students using structure in c.
if we do not use any loop in our file. then a programme will take more time and coding will be too long. an example is following:- #include <stdio.h> #include <stdlib.h> struct student { char name1[50]; char name2[50]; char name3[50]; char name4[50]; char name5[50]; }s; int main() { printf("enter name of 1s students\n"); scanf("%s",s.name1); printf("enter name of 2 students\n"); scanf("%s",s.name2); printf("enter name of 3 students\n"); scanf("%s",s.name3); printf("enter name of 4 students\n"); scanf("%s",s.name4); printf("enter name of 5 students\n"); scanf("%s",s.name5); // displaying name printf("displaying name of five students \n"); printf("name of 1 student : \n"); ...