谭浩强的C语言那本书的最简单的链表结构。语法有错吗?下面是他的写法
#include<stdio.h>void main()
{struct student
{ char name;
int age;
struct next;
};
struct student a,b,*p,*head;
a.name='С¶«';
a.age=17;
b.name='СÃû';
b.age=19;
head=&a;
a.next=&b;
b.next=NULL;
p=head;
do
{printf ("%s%d\n",p->name,p->age);
p=p->next;
}while (p!=NULL);
}