In my code I am trying to read a text file which includes student id, name, grades etc. into a structure. My program is supposed to calculate the average grade and letter grade for each student. But in the first place, my program cannot even read the file. Can you help?

int main() { struct person { char name; char surname; int id; float quiz1; float quiz2; float midterm1; float midterm2; float hw; float fin; float ave; char letter; }students[100]; FILE *fptr; fptr = fopen("C:\\grades.txt","r"); int i; do{ fscanf(fptr, "%d,%c,%c,%f,%f,%f,%f,%f,%f", &students[i].id, &students[i].name, &students[i].surname, &students[i].quiz1, &students[i].quiz2, &students[i].midterm1, &students[i].midterm2, &students[i].hw, &students[i].fin); i++; }while(feof(fptr)==0); fclose(fptr); for(i=0; i<80; i++){ students[i].ave=((students[i].quiz1)*10+(students[i].quiz2)*10+(students[i].midterm1)*15+(students[i].midterm2)*15+(students[i].hw)*10+(students[i].fin)*40)/100; } printf(" Id is: %f \n", students[0].id); }

Text file:

00160004005 name surname 51 71 82 76 94.1 74

00160004009 name2 surname2 85 77 68 78 85.9 69

...(x80)