Coding:When running the program is not taking any input for name...Neither is it printing the name of sudents of the same year.It is not also taking input of department.I apprehend it is doe to not knowing the proper format of gets() that is creating problem.Please help me how to write gets() in case of array of structures.Code:#include<stdio.h> #include<stdlib.h> #include<conio.h> #include<string.h> int main() { struct student { int roll; char name[50]; char department[10]; char course[20]; int yoj; }s[10]; int n,year=0,i=0,choice; printf("\n Enter The no. of students you wanna save detail of->"); scanf("%d",&n); for(i=0;i<n;i++) { printf("\n Enter Name of the student:"); gets(s[i].name); printf("\n Enter details of Mr./Ms:"); puts(s[i].name); printf("\n Enter his/her roll no:"); scanf("%d",&s[i].roll); printf("\n Enter Department of the student:"); gets(s[i].department); printf("\n Enter Course name of the student:"); gets(s[i].course); printf("\n Enter Year of joining of the student:"); scanf("%d",&s[i].yoj); } printf("\n 2 THINGS ARE THERE NOW YOU CAN DO!!!"); printf("\n 1.Print The name of all the students who joined in a particualr year!!!"); printf("\n 2.Exit!!!"); printf("\n Ener your choice->"); scanf("%d",&choice); do { switch(choice) { case 1: printf("\n Enter the year of joining->"); scanf("%d",year); for(i=0;i<n;i++) { if(s[i].yoj==year) { puts(s[i].name); } }break; case 2: printf("\nApplication is Exiting"); exit(0); break; default:printf("\n Wrong Choice!!"); break; } }while(choice!=2); return 0; }