![]() |
#2
ciweitou1632010-08-08 10:08
|
#include<stdio.h>
#include<stdlib.h>
struct stu{
int date;
struct stu *next;
};
void main(void)
{
struct stu *h,*s,*w;
h=(struct stu*)malloc(sizeof(struct stu));
s=(struct stu*)malloc(sizeof(struct stu));
h->next=s;
s->date=1;
s=(struct stu*)malloc(sizeof(struct stu));
s->date=2;
s->next='\0';
w=h->next;
while((w->next)!='\0')
{
printf("%d",w->date);
w=w->next;
}
}