[单选题]

有以下程序}

struct s

{ int x,y; } data[2]={10,100,20,200};}

main( )}

{ struct s *p=data;}

printf("%d/n",++(p->x));}

程序运行后的输出结果是

A.10

B.11

C.20

D.21

参考答案与解析:

相关试题

有以下程序:struct s{ int x,y; }data[2]={10,10

[单选题]有以下程序:struct s{ int x,y; }data[2]={10,100,20,200};main(){ struct s *p=data;printf("%d/n",(++p)->x);}程序运行后的输出结果是( )。A.10 B.11 C.20 D.21

  • 查看答案
  • 有以下程序段 struct st {int x;int *y;}*pt; int

    [单选题]有以下程序段 struct st {int x;int *y;}*pt; int a[]={1,2},b[]={3,4}; struct st c[2]={10,a,20,b}; pt=c; 以下选项中表达式的值为11的是______。A.*pt->yB.pt->xC.++pt->xD.(pt++)->x

  • 查看答案
  • 有以下程序段struct st{int x;int *y;)*pt;int a[

    [单选题]有以下程序段struct st{int x;int *y;)*pt;int a[]={l,2},b[]={3,4};struct st c[2]={10,a,20,b};pt=c;以下选项中表达式的值为 11 的是A.)*pt->yB.)pt->xC.)++pt->xD.)(pt++)->x

  • 查看答案
  • 有以下程序段:struct st{ int x; int * y; } * pt

    [单选题]有以下程序段: struct st { int x; int * y; } * pt; int a[] = {1,2} ,b[] = {3,4}; struct st c[2] = {10,a,20,b}; pt=c; 以下选项中表达式的值为11的是( )。A.*pt->yB.pt->xC.++pt->xD.(pt++)->x

  • 查看答案
  • 有以下程序structs{int x,y;}data[2]={10,100,20

    [单选题]有以下程序 struct s {int x,y;}data[2]={10,100,20,200}; main() { struct s*p=data; printf("%d/n",++(p->x)); } 程序运行后的输出结果是A.10B.11C.20D.21

  • 查看答案
  • 有以下程序 #include struct st { int x,y;} da

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

  • 查看答案
  • 有以下程序 #include struct st { int x,y;} da

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

  • 查看答案
  • 若程序中有以下说明和定义。struct abc{ int x;char y;}s

    [单选题]若程序中有以下说明和定义。struct abc{ int x;char y;}struct abc s1,s2;则会发生的情况是A.编译时出错 B.程序将顺序编译、连接、执行C.能顺序通过编译、连接,但不能执行 D.能顺序通过编译,但连接出错

  • 查看答案
  • 有下列程序段: struct st {int x;int*y;}*pt; int

    [单选题]有下列程序段:struct st{int x;int*y;}*pt;int a[]={1,2},b[]={3,4};stmct st c[2]={10,a,20,b};pt=c;下列选项中表达式的值为11的是( )。A.*pt->yB.pt->xC.++pt->xD.(pt++)->X

  • 查看答案
  • 有下列程序段:struct st{int x;int *y;}*pt;int a

    [单选题]有下列程序段: struct st {int x;int *y;}*pt; int a[]={1,2},b[]={3,4}; struct st c[2]={10,a,20,b}; pt=c; 下列选项中表达式的值为11的是( )。A.*pt->yB.pt->xC.++pt->xD.(pt++)->X

  • 查看答案