大一C语言题目

[复制链接]
查看11 | 回复4 | 2013-8-29 22:56:20 | 显示全部楼层 |阅读模式
手机打太慢了,而且麻烦,只能用汉字说说了,首先定义结构类型的后面要加st[0000],这里头的数字无所谓,比10435大就行,主函数只需加一个循环语句就行,比如for(i=n;istruct student{long int num; char name[10];int age; char sex;char specialty[20];char addr[30];}stu[100],temp;int amount=0;int read(){FILE *f=fopen("stude...
回复

使用道具 举报

千问 | 2013-8-29 22:56:20 | 显示全部楼层
第一:你的文件放在哪里我们都不知道。第二:性别是用什么表示的?中文?英文?一个字符,你是用什么来区别的了?以上2个这么重要的信息都不告诉我们,请问楼主,我们怎么写?...
回复

使用道具 举报

千问 | 2013-8-29 22:56:20 | 显示全部楼层
要用到fprintf和fscanf fputc和fgetc么...
回复

使用道具 举报

千问 | 2013-8-29 22:56:20 | 显示全部楼层
int func(struct student *s, int l, long min, long max){
// s is the head of struct; l is the size, min = 10401, max = 10435 in this example;
int i = 0, count = 0;
fo...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行