Jason:I’m a student,and I have 4 ,too.
第1题:
第2题:
第3题:
设有以下结构类型,并且结构数组student中的元素都已有值,若要将这些元素写到硬盘文件fp中,以下形式错误的是 struct st { char name[8]; int num; float s[4]; } student[50];
A.fwrite(student, 25 * sizeof(struct st), 1, fp);
B.fwrite(student, sizeof(struct st), 50, fp);
C.fwrite(student, 50 * sizeof(struct st), 1, fp);
D.for (i = 0; i < 50; i++) fwrite(student, sizeof(struct st), 1, fp);
第4题:
第5题:
设有以下结构类型,并且结构数组student中的元素都已有值,若要将这些元素写到硬盘文件fp中,以下形式错误的是 struct st { char name[8]; int num; float s[4]; } student[50];
A.fwrite(student, 25 * sizeof(struct st), 2, fp);
B.fwrite(student, sizeof(struct st), 50, fp);
C.fwrite(student, 50 * sizeof(struct st), 1, fp);
D.for (i = 0; i < 50; i++) fwrite(student, sizeof(struct st), 1, fp);