标题:一个链表用插入多个结点,怎么从键盘输入啊,有点混了
取消只看楼主
wll19901105
Rank: 1
等 级:新手上路
帖 子:27
专家分:0
注 册:2012-12-4
结帖率:100%
已结贴  问题点数:8 回复次数:0 
一个链表用插入多个结点,怎么从键盘输入啊,有点混了
#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;
}
搜索更多相关主题的帖子: head include return 
2012-12-14 13:01



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-391232-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.516685 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved