1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > C语言及程序设计进阶例程-17 认识链表

C语言及程序设计进阶例程-17 认识链表

时间:2023-03-11 07:32:41

相关推荐

C语言及程序设计进阶例程-17 认识链表

贺老师教学链接C语言及程序设计进阶本课讲解

例 建立并输出一个简单链表

#include <stdio.h>struct Student{int num;float score;struct Student *next;};int main( ){struct Student a,b,c,*head,*p;a. num=31001;a.score=89.5;b. num=31003;b.score=90;c. num=31007;c.score=85;head=&a;a.next=&b;b.next=&c;c.next=NULL;p=head;do{printf("%d %.1f\n", p->num, p->score);p=p->next;}while(p!=NULL);return 0;}

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。