, qq->name, qq->num," /> , qq->name, qq->num," />

全文预览

C语言教材源代码

上传者:相惜 |  格式:pdf  |  页数:71 |  大小:3226KB

文档介绍
canf(fp, a %s %d %d %s\n” , qq->name, &qq->num, &qq->age, qq->addr);\rprintf ( u \n\nname\tnumber age addr\n,,) ;\rqq=boyb;\rfor (i=0;i<2;i++, qq++)\rprintf ( "%s\t%5d %7d %s\n,> , qq->name, qq->num, qq->age, qq->addr) ; fclose(fp);\r)\r. 10. 7\r#include<stdio. h>\r#include<stdlib. h>\rstruct stu.\rchar name[10];\rint num;\rint age;\rchar addr[15];\r}boy,*qq;\rvoid main()\r(\rFILE *fp;\rchar ch;\rint i=l;53\rqq=&boy;\rif((fp=fopen( , "rb" ))==NULL) {\rprintf( ^Cannot open file, exit!w ) ; exit(1);\r)\rrewind(fp);\rfseek(fp, i*sizeof (struct stu),0);\rfread(qq, sizeof(struct stu), 0, fp);\rprintf( a \n\nname\tnumber age addr\n printf( <4%s\t%5d %7d %s\n\rqq->addr);\r) ; “Bqq->name, qq->num, qq->age, 54

收藏

分享

举报
下载此文档