#include<stdio.h>
#include<stdlib.h>
#define LEN sizeof(struct Stuent)
struct Student
{
long num;
float score;
struct student * next;
};
int n;
void print(struct Student * head)
{
struct Student * p;
printf("\nNow,These %d records are: \n", n);
p = head;
if(head != NULL)
do
{
printf("%ld %5.lf\n", p->num,p->score);
p=p->next;
}while(p != NULL);
}
1、这个函数可以编译,但是不能运行;
2、结构体和指针在链表中使用的很广泛;
3、链表和图一样,有单链表、双链表、环形链表。