做人做成这样,笑死我了
程序代码:
#include<stdio.h> struct Student { int num; float score; struct Student *next; }; int main() { struct Student a, b, c, *head, *p; head = &a; a.next = &b; b.next = &c; c.next = NULL; a.num = 10101; a.score = 89; b.num = 10103; b.score = 76; c.num = 10107; c.score = 66; while (p != NULL) { printf("%d %5.2f\n", p->num, p->score); p = p->next; } return 0; }