#include"head.h" void print(struct Student* head) { struct Student *p; printf("There are %d records:\n", sum); p = head; if (p != NULL) { do { printf("%ld %d\n", p->num, p->score); p = p->next; } while (p != NULL); //以链表结尾的NULL为终止条件 } }