1
来源:互联网 发布:开淘宝店后要怎么操作 编辑:程序博客网 时间:2024/06/08 13:03
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
# difine num 100
typedet struct{
int num;
char name[20];
int english;
int chinese;
int math;
}
int main( )
{
int key; //查询关键词
FILE *fp;
student stu1[100],stu2[100];
fp = fopen("student.dic","wb+"); //以输入的方式打开文件
if(fp==NULL) //测试是否成功打开
{
printf("open error!\n");
exit(1);
}
fwrite{(void*)stu1,sizeof(student),100,fp);
rewind(fp);
do
{
scanf("%d", key);
if (key==0)//0000应该加上双引号,否则想结束运行时,不能停止,会认为输入的是一个单词000
break;
else
{
printf("%s%d%d%d%d",name[key-1]);
}
}
while(1);}
#include<string.h>
#include<stdlib.h>
# difine num 100
typedet struct{
int num;
char name[20];
int english;
int chinese;
int math;
}
int main( )
{
int key; //查询关键词
FILE *fp;
student stu1[100],stu2[100];
fp = fopen("student.dic","wb+"); //以输入的方式打开文件
if(fp==NULL) //测试是否成功打开
{
printf("open error!\n");
exit(1);
}
fwrite{(void*)stu1,sizeof(student),100,fp);
rewind(fp);
do
{
scanf("%d", key);
if (key==0)//0000应该加上双引号,否则想结束运行时,不能停止,会认为输入的是一个单词000
break;
else
{
printf("%s%d%d%d%d",name[key-1]);
}
}
while(1);}
0 0
- 1
- 1
- 1
- 1
- 1
- 1
- 1》
- 1
- 1
- 1
- 1
- (1)
- 1
- 1
- 1
- 1
- 1
- 1
- 论文笔记:Deep Image Matting
- NDK开发步骤
- 双击返回键退出应用程序的方法
- 2017-3月- 工作-随想
- spring事务原理
- 1
- jumpserver 堡垒机环境搭建(图文详解)
- [leetcode刷题] Remove Duplicates from Sorted Array
- php算俩个时间戳相差多少
- Android加载新项目Building时间久
- XGBoost Stopping to Avoid Overfitting(early_stopping_rounds )
- 人脸检测和人脸识别方法的比较
- MAC上NTFS格式移动硬盘的读写问题
- pcl通过积分图来进行法线预测