题海让大学四年没有难题
白天模式登陆

题目详情

单选题 以下程序运行后的输出结果是( ). #include <stdio.h> #include <stdlib.h> struct NODE { int num; struct NODE *next; }; int 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); return 0; }

A. 10

B. 20

C. 30

D. 40

C程序设计课程封面

学科:C程序设计

时间:2025-05-11 07:10:58

Copyright © 2022 津ICP备2021001502号