热门

最新

红包

立Flag

投票

同城

我的

发布
weixin_52226501
亿头老母猪
5 年前
trueweixin_52226501

#include<stdio.h>
#include<stdlib.h>
#include<string.h>

struct linknode
{
int data;
struct linknode *next;

};

void test()
{
struct linknode node1 = {10,NULL};
struct linknode node2 = {20,NULL};
struct linknode node3 = {30,NULL};
struct linknode node4 = {40,NULL};
struct linknode node5 = {50,NULL};
struct linknode node6 = {60,NULL};

node1.next =&node2;
node2.next =&node3;
node3.next =&node4;
node4.next =&node5;
node5.next =&node6;
struct linknode *pcurrent =&node1;
while(pcurrent != NULL)
{
printd("%d",pcurrent->data);
pcurrent = pcurrent->next;
}
}

int main()
{
test();
system("pause");
return EXIT_SUCCESS;
}

CSDN App 扫码分享
分享
评论
点赞
打赏
  • 复制链接
  • 举报
下一条:
大家好,我是[收集明天的回忆]•上榜了一下!
立即登录