#include "stdio.h" struct student { long num; float score; struct student * next; };void main(){ struct student stu1,stu2,stu3; struct student * head,*p; stu1.num=1; stu2.num=2; stu3.num=3; head=&stu1; stu1.next=&stu2; stu2.next=&stu3; stu3.next=NULL; //p=head不用p不是也可以吗,p有什么用 while(head!=NULL){ printf("%d\n",head->num); head=head->next; } }
- 3 回答
- 0 关注
- 1943 浏览
添加回答
举报
0/150
提交
取消