[单选题]

有以下程序:includestruct tt{int x;struct tt*y;}*p;struct tt a[4]={20,a£«1,15,a£«2,

有以下程序: #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.30,17

C.15,30

D.20,15

参考答案与解析:

相关试题

有以下程序:#includestruct tt{ int x;struct tt

[单选题]有以下程序:includestruct tt{ int x;struct tt *y;} *p;struct tt a[4]={20,a£«1,15,a有以下程序: #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;}

  • 查看答案
  • 有以下程序 #include struct tt { int x; struc

    [单选题]有以下程序 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

  • 查看答案
  • 有以下程序#include <stdio.h>struct tt{ int x;

    [单选题]有以下程序#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.)30,17C.)15,30,D.)20,15,

  • 查看答案
  • 设有以下语句 typedef struct TT {char c; int a[

    [单选题]设有以下语句 typedef struct TT {char c; int a[4];}CIN; 则下面叙述中正确的是______。A.可以用TT定义结构体变量B.TT是struct类型的变量C.可以用CIN定义结构体变量D.CIN是struct TT类型的变量

  • 查看答案
  • 设有以下语句 typedef struct TT {char c; int a[

    [单选题]设有以下语句 typedef struct TT {char c; int a[4];}CIN; 则下面叙述中正确的是______。A.可以用TT定义结构体变量B.TT是struct类型的变量C.可以用CIN定义结构体变量D.CIN是struct TT类型的变量

  • 查看答案
  • 设有以下语句typedef struct TT{char c,int a[4];

    [单选题]设有以下语句typedef struct TT{char c,int a[4];} CIN;则下面叙述中正确的是A.) 可以用 TT 定义结构体变量B.)TT 是 struct 类型的变量C.) 可以用 CIN 定义结构体变量D.)CIN 是 struct TT 类型的变量

  • 查看答案
  • 设有以下语句:Typedef struct TT{char c; int a[4

    [单选题]设有以下语句:Typedef struct TT{char c; int a[4];}CIN;则下面叙述中错误的是( )。A.不可以用TT定义结构体变量B.TT是结构体标识名C.可以用CIN定义结构体变量D.CIN是struct TT类型的变量

  • 查看答案
  • 有以下程序#includestruct ord{ int x,y;} dt[2]

    [单选题]有以下程序includestruct ord{ int x,y;} dt[2]={1,2,3,4};mare(){struct ord*p=dt; p有以下程序 #include<stdio.h> struct ord { int x,y;} dt[2]={1,2,3,4}; mare() { struct ord*p=dt; printf("%d,",++p->x); printf("%d/n",++p->y); } 程序的运行结果是______。A.1,2B.2,3C.3,4D.4,

  • 查看答案
  • 有以下程序#includestruct ord{ int x,y;} dt[2]

    [单选题]有以下程序includestruct ord{ int x,y;} dt[2]={1,2,3,4};mare(){struct ord*p=dt; p有以下程序 #include<stdio.h> struct ord { int x,y;} dt[2]={1,2,3,4}; mare() { struct ord*p=dt; printf("%d,",++p->x); printf("%d/n",++p->y); } 程序的运行结果是______。A.1,2B.2,3C.3,4D.4,

  • 查看答案
  • 以下程序的输出结果是()。#includestruct st{int x;int

    [单选题]以下程序的输出结果是()。includestruct st{int x;int*y;}*p; int dt[4] ={ 10,20,30,4以下程序的输出结果是( )。 #include<stdio.h> struct st { int x; int *y;} *p; int dt[4] ={ 10,20,30,40 }; struct st aa[4]={ 50,&dt[0],60,&dt[0],60,&dt[0],60,&dt[0]}; main() { p=

  • 查看答案
  • 有以下程序:#includestruct tt{int x;struct tt*