1、数组
2、指针
二、代码展示。#include三、总结。struct stu{ int num; float score; struct stu *next; }; struct stu a, b, c, *head; void hou(){ a.num =1; a.score = 89; b.num = 2 ; b.score = 98; c.num = 3; c.score = 99; head = &a; a.next = &b; b.next = &c; c.next = NULL; do{ printf("student number: %d score:%fn",head->num, head->score); head = head->next; //head->next = head }while(head); } int main(){ hou(); return 0; }
本代码比较简单,不再过多讲解。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)