人员的记录由编号和出生年、月、日组成,N名人员的数据已在主函数中存入结构体数组std中,且编号唯一。 函数fun的功能是:找出指定编号人员的数据,作为函数值返回,由主函数输出,若制定编号不存在,返回数据中的编号为空串。
函数接口定义:
struct student fun(struct student *std, char *num)
其中 std 和 num 都是用户传入的参数。 函数fun的功能是:在 std 结构体数组中找出指定编号 num 人员的数据,作为函数值返回,由主函数输出,若制定编号不存在,返回数据中的编号为空串。
裁判测试程序样例:
#include <stdio.h>
#include <string.h>
#define N 8
struct student
{
char num[10];
int year,month,day ;
};
struct student fun(struct student *std, char *num)
int main()