The first scan works perfect on the next scan its skips name and scan continue to class number, can't find a problem in debugger please need advise thank you.Code:#include <stdio.h> #include <stdlib.h> #include <string.h> #define NAMESIZE 20 #define STD 36 typedef struct { char studentName[NAMESIZE]; int classNumber; int gradeOne; int gradeTwo; int gradeYear; }students; typedef students classes[STD]; // This is type of void scanStudent(classes s); //CLASSES int main() { classes cls; scanStudent(cls); } void scanStudent(classes cls) //TRANSFER CLASSES { int; for (int i = 0; i < STD; i++) { printf("Please enter student name\n"); gets(cls[i].studentName); printf("Please enter the CLASS NUMBER in range between 5-1 *****\n"); _flushall(); do { scanf("%d", &cls[i].classNumber); } while (cls[i].classNumber>5 || cls[i].classNumber<0); printf("Please enter the grade of first semester\n"); _flushall(); do { scanf("%d",&cls[i].gradeOne); if (cls[i].gradeOne > 100 || cls[i].gradeOne < 0) printf("Wrong value please reenter\n"); } while (cls[i].gradeOne> 100 || cls[i].gradeOne < 0); _flushall(); printf("Please enter the grade of Second semester\n"); do { scanf("%d",&cls[i].gradeTwo); if (cls[i].gradeTwo>100 || cls[i].gradeTwo < 0) printf("Wrong value please reenter\n"); } while (cls[i].gradeTwo>100 || cls[i].gradeTwo < 0); cls[i].gradeYear = (cls[i].gradeOne + cls[i].gradeTwo) / 2; } }