C语言源代码摘要.doc
#includestdio.h
#includestdlib.h
#includestring.h
#includeconio.h
/*定义学生结构体*/
struct Student
{
int ID;
char Name[20];
char college[20];
char CLASS[20];
int score1;
int score2;
int score3;
float aver;
};
struct Student students[100];
int num=0;
int read_file()
{
FILE *fp;
int i=0;
if((fp=fopen(student.txt,rt))==NULL)
{
printf(\n\n*****库存文件不存在!请创建);
return 0;
}
while(feof(fp)!=1)
{
fread(students[i],sizeof(students),1,fp);
if(students[i].ID==0) break;
else i++;
}
fclose(fp);
您可能关注的文档
最近下载
- Rhino软件二次开发:RhinoCommonAPI使用详解.pdf VIP
- 2014标化工地创建方案.docx VIP
- 欧洲外贸网址大全.doc VIP
- 建筑专业的心得体会(通用6篇).pdf VIP
- 富士B9125 Copier-Printer Copier-Printer施乐B9136 Copier-Printer Copier-Printer, B9100 Copier-Printer Copier-Printer, B9110 Copier-Printer Copier-Printer使用说明书.pdf VIP
- 药物临床试验中试验用药品的管理.ppt VIP
- 包装厂电动地平车安全风险分级管控清单.doc VIP
- 三轴搅拌桩试验桩总结.docx
- 大棚蔬菜施肥技术.ppt VIP
- 电工电子技术(第3版)全套课件.pptx
原创力文档

文档评论(0)