while ( fgets( input, 100, record) != NULL) { sscanf(input,"%d %f", &studentid[i], &scores[i]); i++; }