#include <stdio.h>

int main()
{
    FILE* fp;
    char  line[255];
    int n;
    n = 0;

    fp = fopen("a.txt" , "r");
    while (fgets(line, sizeof(line), fp) != NULL)
    {
        const char* val1 = (char*) strtok(line, ",");
        //const char* val2 = strtok(NULL, ",");

       //printf("%s|%s\n", val1, val2);
        printf("%s", val1);
        n = n + 1;
    }
    printf("\ntotal student number: %d\n", n);
}