有以下程序 #include structNODE {intnum;structNODE*next;}; main() {structNODE*p *q

计算机 程序, 已帮助 人

有以下程序

#include

struct NODE

{ int num; struct NODE *next; };

main()

{ struct NODE *p,*q,*r;

p=(struct NODE*)malloc(sizeof(struct NODE));

q=(struct NODE*)malloc(sizeof(struct NODE));

r=(struct NODE*)malloc(sizeof(struct NODE));

p->num=10; q->num=20; r->num=30;

p->next=q;q->next=r;

printf("%d\n ",p->num+q->next->num);

}

程序运行后的输出结果是

A.10

B.20

C.30

D.40

请帮忙给出正确答案和分析,谢谢!

热搜:以下哪个程序是正确的病史采集的程序