我是靠谱客的博主 高挑抽屉,这篇文章主要介绍初试链表,现在分享给大家,希望可以做个参考。

#include <stdio.h>
#define students A
struct A
{
    int num;
    double score;
    struct A *next;
};

int main()
{
    struct A a,b,c,*head,*p;
    a.num=10000;
    a.score=80.2;
    b.num=20000;
    b.score=87.5;
    c.num=30000;
    c.score=98.5;
    head=&a;
    a.next=&b;
    b.next=&c;
    c.next=NULL;
    p=head;
    do{
        printf("%d %.2lfn",p->num,p->score);
        p=p->next; //使链表一直往后
    }
    while (p!=NULL);
    return 0;
}



最后

以上就是高挑抽屉最近收集整理的关于初试链表的全部内容,更多相关初试链表内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(46)

评论列表共有 0 条评论

立即
投稿
返回
顶部