.\rfor (i=0;i<n;i++)\r{ putc(c[i], fp);\rputchar (c[ij);\rfclose(fp);\rN 100\rQRy?`?y3 j^`ST?k(` ¡,\r¢^)`£¤b\r¥¦^`§¨yj|£¤bj¥¦i©??cd/stud/g\r1 .\r2 . !"\r#include /stdio. h/\rstruct student\r{ char num[6];\rchar name[8];\rint score[3];\rfloat avr;\r} stu « p\rmain()\r{int i,j,sum;\rFILE *fp;\r/*input*/\rfor(i=0;i<5;i++)\r{ printf (`z\n please input No. %d score:\nz/, i);\rprintf("stuNo:/)p\rscanf(/%s/`stu[i]. num);\rprintf("name:");\rscanf(/Bs/`stu[i]. name);\rsum=0;\rfor(j=0;j<3;j++)\r{ printf (''score %d. /`j+1);\rscanf (/%d/, &stu[i]. score[j]);\rsum+=stu[i]. score[j];\r)\rstu[i]. avr=sum/3. 0;\r)\rfp=fopen(/stud/`/w/)p\rfor (i=0;i<5;i++)\rif(fwrite(&stu[i], sizeof(struct student), 1, fp)!=1)\rprintf ("file write error\n`/);\rfclose(fp);\r)