[填空題] 以下程序把三個NODETYPE型的變量鏈接成一個簡單的鏈表,并在while循環(huán)中輸出鏈表結(jié)點(diǎn)數(shù)據(jù)域中的數(shù)據(jù)。請?zhí)羁铡? #include <stdi
2021-07-20
[填空題] 以下程序把三個NODETYPE型的變量鏈接成一個簡單的鏈表,并在while循環(huán)中輸出鏈表結(jié)點(diǎn)數(shù)據(jù)域中的數(shù)據(jù)。請?zhí)羁铡?/p>
#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=’’;
p=h;
while(p)printf("o/od,",p->data);______;
printf("");
正確答案:p=p->next
詞條內(nèi)容僅供參考,如果您需要解決具體問題
(尤其在法律、醫(yī)學(xué)等領(lǐng)域),建議您咨詢相關(guān)領(lǐng)域?qū)I(yè)人士。