全文预览

c语言程序与设计教程

上传者:梦&殇 |  格式:pdf  |  页数:50 |  大小:4081KB

文档介绍
(,,stu.dat",,,wb");\rfwrite(p,sizeof(struct student)*n,l,fp);\rfclose(fp);\rfree(p);\rputs(Hinfo sved...");\rputs(Mstudent good:");\rfp=fopen(nstu.dat,',,,rbn);\rfread(&s,sizeof(struct student),l,fp);\rwhile(!feof(fp))\r(\rif(s.score>=80)printf(,'%s\t%s\t%f\n',,s.no,s.name,s.score);\rfread(&s,sizeof(struct student) J ,ip);\r)\rfclose(fp);\r)\rM4`a\rn:4<CR>\rinput student info:num name score\r101 wang 79<CR>\r102 zhang 80<CR>\r103 li 89(CR>\r104 zhao 90vCR>\rinfo sved...\rstudent good:\r102 zhang 80.000000\r103 li 89.000000\r104 zhao 90.000000\r2I b5?cd5?e@I5?f@P"#”test.bin”\r#include <stdio.h>\rvoid main()\r(\rFILE *fp;\rint i=32767;\rchar ch-A';\rfp f fopen("test.bin","wb");\rfwrite(&i,sizeof(int), 1 ,fp);\rfwrite(&ch,sizeof(char), 1 ,fp);\rfclose(fp);

收藏

分享

举报
下载此文档