问题
填空题
以下程序把三个NODETYPE型的变量链接成一个简单的链表,并在while循环中输出链表结点数据域中的数据。请填空。
#include <stdio.h>
struct node
int data; struct node *next:;
typedef struct node NODETYPE;
main()
NODETYPE a, b, c, *h, *p;
a.data=10; b.data=20; c.data=30; h=&a;
a.next=&b; b.next=&c; c.next=’\0’;
p=h;
while(p)printf("o/od,",p->data);______;
printf("\n");
答案
参考答案:p=p->next