#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为终止条件 } }
时间: 2024-10-13 11:21:22