有以下程序
#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(struct NODE));
r=(struct 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() {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;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
[单选题]有以下程序 inGlude struct NODE { int num; struct NODE *next; } main() {struct N有以下程序#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(
[单选题]有以下程序段: 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 STU {int num; float TotalScore;有以下程序: #include <strino.h> struct STU {int num; float TotalScore; }; void f(struct STU p) {struct STU s[2]={{20044,550},{20045,537}}; p.num=s[1].num;p.TotalScore=s[1].TotalScore; } main() {struct
[单选题]有下列程序段: typedef struct NODE {int num;struct NODE*next; }OLD; 下列叙述中正确的是( )。A.以上的说明形式非法B.NODE是一个结构体类型C.OLD是一个结构体类型D.OLD是一个结构体变量