程序通过定义学生结构体变量,存储了学生的、姓名和三门课的成绩。所有学生数据均以二进制方式输出到文件中。函数fun的功能是从形参filename所指的文件中读入学生数据,并按照从小到大排序后,再用二进制方式把排序后的学生数据输出到filename所指的文件中,覆盖原来的文件内容。 请选择在下画线处填入正确的语句,使程序得出正确的结果。 #include #define N 5 typedef struct student { long sno; char name[10]; float score[3]; } STU; void fun(char *filename) { FILE *fp; int i, j; STU s[N], t; fp = fopen(filename,"r"); fread(s, sizeof(STU), N, fp); fclose(fp); for (i=0; i s[j].sno) { t = s[i]; s[i] = s[j]; s[j] = t; } fp = fopen(filename, "wb"); /**********found**********/ ____(s, sizeof(STU), N, fp); fclose(fp); } main() { STU t[N]={ {10005,"ZhangSan", 95, 80, 88}, {10003,"LiSi", 85, 70, 78}, {10002,"CaoKai", 75, 60, 88}, {10004,"FangFang", 90, 82, 87}, {10001,"MaChao", 91, 92, 77}}, ss[N]; int i,j; FILE *fp; fp = fopen("student.dat", "wb"); fwrite(t, sizeof(STU), 5, fp); fclose(fp); printf("\n\nThe original data :\n\n"); for (j=0; j A. fread B. fwrite C. fopen D. fp