有以下程序
#inGlude<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(struct NODE));
r=(stnlct NODE*)malloc(sizeof(struct NODE));
p->num=1;q->num=2;r->num=3;
p->next=q;q->next;r;r->next=NULL;
sum+=q->next->Num,sum+=p->num;
printf("%d/n",sum);
}
执行后输出结果是
A.3
B.4
C.5
D.6
[单选题]有以下程序 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; 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
[单选题]有以下程序段: typedef struct NODE {int num; struct NODE *next; }OLD; 以下叙述中正确的是 ______。A.以上的说明形式非法B.NODE是一个结构体类型C.OLD是一一个结构体类型D.OLD是一个结构体变量
[单选题]有以下程序段 typedef struct NODE {int num; struct NODE *next; }OLD; 以下叙述中正确的是A.以上的说朗形式非法B.NODE是一个结构体类型C.OLD是一个结构体类型D.OLD是一个结构体变量
[单选题]有以下程序: 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() { 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
[单选题]有下列程序段: typedef struct NODE {int num;struct NODE*next; }OLD; 下列叙述中正确的是( )。A.以上的说明形式非法B.NODE是一个结构体类型C.OLD是一个结构体类型D.OLD是一个结构体变量
[单选题]有以下程序段typedef struct node { int data; struct node *next; } *NODE;NODE p;以下叙述正确的是A.)p 是指向 struct node 结构变量的指针的指针B.)NODE p ;语句出错C.)p 是指向 struct node 结构变量的指针D.)p 是 struct node 结构变量