I need to read the data store in .txt file which are sparated by comma.
StudentList.txt

```
Olivia,SWANSON,F,29001,20
Emma,ONEILL,F,7900,19

```

According to online assitance, I tried the following operations:

```
FILE *fp;
char fname[20];
char sname[20];
char gender[2];
int ID;
int age;
fp = fopen("C:\\Users\\Catlover\\Desktop\\DSA\\Program2\\StudentList.txt", "r");
if(fp == NULL){
    perror("Open fail.");
    exit(1);
    }
while(fscanf(fp, "%s,%s,%s,%d,%d", fname, sname, gender, &ID, &age) == 5)
{
    printf("%s, %s, %s, %d, %d", fname, sname, gender, ID, age);
}
fclose(fp);
return 0;

```

May be I have some wrong understandings about the principle of function `fscanf`

There is nothing output.