首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > 其他 > 编程题(15_01.c) 结构 struct student { long num char name[20] int score struct student *

编程题(15_01.c) 结构 struct student { long num char name[20] int score struct student *

  • 资源大小:2 K
  • 上传时间:2024-06-03
  • 下载次数:0次
  • 浏览次数:1次
  • 资源积分:1积分
  • 标      签: student struct score long

资 源 简 介

编程题(15_01.c) 结构 struct student { long num char name[20] int score struct student *next } 链表练习: (1).编写函数struct student * creat(int n),创建一个按学号升序排列的新链表,每个链表中的结点中 的学号、成绩由键盘输入,一共n个节点。 (2).编写函数void print(struct student *head),输出链表,格式每行一个结点,包括学号,姓名,分数。 (3).编写函数struct student * merge(struct student *a,struct student *b), 将已知的a,b两个链表 按学号升序合并,若学号相同则保留成绩高的结点。 (4).编写函数struct student * del(struct student *a,struct student *b),从a链表中删除b链表中有 相同学号的那些结点。 (5).编写main函数,调用函数creat建立2个链表a,b,用print输出俩个链表;调用函数merge升序合并2个 链表,并输出结果;调用函数del实现a-b,并输出结果。 a: 20304,xxxx,75, 20311,yyyy,89 20303,zzzz,62 20307,aaaa,87 20320,bbbb,79 b: 20302,dddd,65 20301,cccc,99 20311,yyyy,87 20323,kkkk,88 20307,aaaa,92 20322,pppp,83

相 关 资 源

您 可 能 感 兴 趣 的

同 类 别 推 荐

VIP VIP
0.177922s