基于C语言编写的链表,可以直接复制,可以运行 #include<stdio.h>#include<stdlib.h>typedef struct Student{int num;char name[10];struct Student *pnext;}STU;STU*GreatList(){STU*p = (STU*)malloc(sizeof(STU));p->pnext = NULL;return p;}void AddNode(STU*p){STU*pNew = NULL;int n;printf("renshu");scanf("%d", &n);for (int i = 0; i < n; i++){pNew = (STU*)malloc(sizeof(STU));printf("11");printf(" ");scanf("%s", pNew->name);printf("222");scanf("%d", &pNew->num);pNew->pnext = NULL;p->pnext = pNew;p = p->pnext;}}int main(){STU *pStu = NULL;pStu = GreatList();AddNode(pStu);printf("%dt%sn", pStu->pnext->num, pStu->pnext->name);}