一个链表用插入多个结点,怎么从键盘输入啊,有点混了
#include <stdio.h>#include <stdlib.h>
struct student
{
int age;
char name[10];
struct student *next;
};
struct student *add(struct student *head)
{
struct student *p = malloc(sizeof(struct student));
p->next = head;
head = p;
return head;
}