有以下程序
#include <stdlib.h>
gtruet 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(sizeef (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.50
[单选题]有以下程序#includestruct 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->
[单选题]有以下程序 include struct tt { int x; struct tt *y; } *p; s有以下程序 #include <stdio.h> struct tt { int x; struct tt *y; } *p; struct tt a[4]= {20,a+ 1,15,a+2,30,a+3,17,a}; main() { int i; p=a; for(i=1; i<-2; i++) { printf("%d,", p->x ); p=p->y; }A.20,30,B
[单选题]有下列程序段: typedef struct NODE {int num;struct NODE*next; }OLD; 下列叙述中正确的是( )。A.以上的说明形式非法B.NODE是一个结构体类型C.OLD是一个结构体类型D.OLD是一个结构体变量
[单选题]有以下程序 include struct NODE{ int num; struct NODE *next;}; main( )有以下程序#include <stdlib.h>struct NODE{int num;struct NODE *next;};main( ){ struct NODE *p,*q,*r;int sum=0;p=(struct NODE *)malloc(sizeof(struct NODE));q=(struct NODE *)malloc(sizeof(struc
[单选题]有以下程序: include struct NODE {int num;stmct NODE *next;}; main( ) { str有以下程序:#include<stdlib.h>struct NODE{ int num;stmct NODE *next;};main( ){ struct NODE * p, * q,* r;p=(struct NODE * )malloc(sizeof(struct NODE) );q=(struct NODE * )malloc(sizeof(stru
[单选题]有以下程序 include struct NODE { int num;struct NODE*next;}; main() { struct NO有以下程序#include<stdlib.h>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
[单选题]有以下程序 include struct NODE {int num;stmct NODE*next;}; main() { struct NODE有以下程序#include<stdlib.h>struct NODE{ int num;stmct NODE*next;};main(){ struct NODE*p,*q,*r;p=(struct NODE*)malloc(sizeof(struct NODE));q=(struct NODE*)malloc(sizeof(struct NODE)
[单选题]有以下程序: include struct NODE{ int num; struct NODE*next; } main() {structNOD有以下程序:#include<stdlib.h>struct NODE{int num;struct NODE *next;}main(){ struct NODE *p,*q,*r;int sum=0;p=(struct NODE *)malloc(sizeof(struct NODE));q=(Struct NODE *)malloc(sizeo
[单选题]有以下程序: include struct NODE { int num; struct NODE*next; }; main() { struct有以下程序:#include <stdlib.h>struct NODE{ int num; struct NODE *next; };main(){ struct NODE *p,*q,*r;p=(struct NODE*)malloc(sizeof(struct NODE));q=(struct NODE*)mallloc(sizeof(stru
[单选题]试题37有以下程序#include <stdio.h>main(){ struct node {int n; struct node *next; }*p;struct node x[3]={{2,x+1},{4,x+2},{6,NULL}};p=x;printf(“%d,”, p?n);printf(“%d/n”, p?next?n);}程序运行后的输出结果是()A.2,3B.2,4C.3,4D.4,6