[单选题]

有以下程序: 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

参考答案与解析:

相关试题

有以下程序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

  • 查看答案
  • 有以下程序structS{intn;inta[20];};voidf(int*a

    [单选题]有以下程序struct S{ int n; int a[20]; }; void f(int *a,int n) {int i; for(i=0;i a[i]+=i; } main() {int i; struct S s={10,{2,3,1,6,8,7,5,4,10,9}}; f(s.a, s.n); for(i=0;i printf(“%d”,s.a[i]); } 程序运行后的输出结果是( )。A.2,4,3,9,12,12,11,11,18,9,B.3,4,2,7,9,8,6,5,11,

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

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

  • 查看答案
  • 有以下程序: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

  • 查看答案
  • 有以下程序main(){ intx=3,y=2,z=1;printf("%d\n

    [单选题]有以下程序 main() { int x=3,y=2,z=1; printf("%d/n",x/y&~z); } 程序运行后的输出结果是A.3B.2C.1D.0

  • 查看答案
  • 有以下程序 fun(intx,inty,intz) {z=x*y;} main(

    [单选题]有以下程序fun(int x,int y,int z){ z=x*y;}main(){int a=4,b=2,c=6;fun(a,b,c);printf("%d",c);}程序运行后的输出结果是A.16B.6C.8D.12

  • 查看答案
  • 有以下程序:#includemain(){intx=1,y=0,a=0,b=0;

    [单选题]有以下程序:includemain(){intx=1,y=0,a=0,b=0;switch(x){case 1:switch(y){case 0:a£«有以下程序: #include<stdio.h> main() { int x=1,y=0,a=0,b=0; switch(x) { case 1: switch(y) { case 0:a++;break; case 1: b++;break; } case 2:a++;b++;break; case 3:a++;b++; } printf(

  • 查看答案
  • 有以下程序#includemain(){intx=1,y=0,a=0,b=0;

    [单选题]有以下程序includemain(){intx=1,y=0,a=0,b=0; switch(x) {case1:switch(y){case0:a£«£«有以下程序 #include <stdio.h> main() { int x=1,y=0,a=0,b=0; switch(x) { case 1: switch(y) { case 0:a++; break; case 1:b++; break; } case 2:a++;b++; break; case 3:a++;b++; } print

  • 查看答案
  • 以下程序的输出结果是(16)。 main() {intx=100,a=10,b=

    [主观题]以下程序的输出结果是(16)。main(){ int x=100, a=10, b=20, ok1=5, ok2=0;if(aelse if(ok2)x=10;else x=-1;printf("%d\n", x);}

  • 查看答案
  • 有以下程序#includemain(){intx=1,y=0,a=0,b=0;s

    [单选题]有以下程序includemain(){intx=1,y=0,a=0,b=0;switch(X){case1:switch(y){case0:a£«£«;b有以下程序 #include <stdio.h> main() { int x=1,y=0,a=0,b=0; switch(X) { case 1: switch(y) { case 0:a++; break; case 1:b++; break; } case 2:a++;b++;break; case 3:a++;b++; } printf

  • 查看答案