#include<stdio.h>
#include<string.h>
#include<stdlib.h>
typedef struct student
{
int data
;
int score
;
struct student
*next
;
} stu
;
int main()
{
stu s1
={1,10,NULL};
stu s2
={10,30,NULL};
stu s3
={20,10,NULL};
s1
.next
= &s2
;
s2
.next
= &s3
;
s3
.next
= NULL;
struct student
*p
=NULL;
p
=&s1
;
while(p
)
{
printf("%d %d \n",p
->data
,p
->score
);
p
=p
->next
;
}
return 0;
}
转载请注明原文地址:https://ipadbbs.8miu.com/read-56751.html