69,336
社区成员
发帖
与我相关
我的任务
分享
#include <stdio.h>
#include <stdlib.h>
struct student{
int num;
struct student * next;
};
main() {
struct student * head;
struct student *p1,*p2;
p1->num = 1;
p2->num = 2;
p1->next = p2;
p2->next = NULL;
head = p1;
while(p1 != NULL){
printf("%d\n",p1->num);
p1 = p1->next;
}
}