On the second iteration of the for loop, there seems to be a null character that is preventing me from inserting my input. Is there a way to overcome this?
# include <stdio.h> struct student { char name[10]; int score; }; int main() { int size = 5; struct student arr[size]; for (int i = 0; i<size; i++ ) { printf("[%d]# Please enter your name ... ",i+1); fgets(arr[i].name,10, stdin); printf("\n[%d]# Please insert your score ... ",i+1); scanf("%d",&arr[i].score); system("CLS"); } return 0; }