//*作者:冰糖
//*日期:2018年12月1日
//*章节:第九章
//*题号:8
//*题目:写一个函数insert,用来向一个动态链表插入结点。
#include<stdio.h>
#include<stdlib.h>
struct student
{
int num;
char name[20];
float score[3];
float aver;
struct student *next;
};
int main()
{
void insert(struct student *phead,struct student *pt);
insert(head,p);
return 0;
}
void insert(struct student *phead,struct student *pt)
{
struct student *p1;
p1=phead;
phead=pt;
if(phead!=NULL)
pt_>next=p1;
else pt_>next=NULL'
}
C语言程序设计第四版(谭浩强)9.8 写一个函数insert,用来向一个动态链表插入结点。
最新推荐文章于 2022-03-03 20:41:59 发布