#include <stdio.h>
#define students A
struct A
{
int num;
double score;
struct A *next;
};
int main()
{
struct A a,b,c,*head,*p;
a.num=10000;
a.score=80.2;
b.num=20000;
b.score=87.5;
c.num=30000;
c.score=98.5;
head=&a;
a.next=&b;
b.next=&c;
c.next=NULL;
p=head;
do{
printf("%d %.2lfn",p->num,p->score);
p=p->next; //使链表一直往后
}
while (p!=NULL);
return 0;
}
最后
以上就是高挑抽屉最近收集整理的关于初试链表的全部内容,更多相关初试链表内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复