下列程序的输出显示结果是 #include <stdio.h> struct abc { int a,b; int c; }; main() { struct abc s[2]={{1,2,3},{4,5,6}}; int t; t=s[0].a+s[1].b; printf("%d",t); }A.5B.6C.7D.8

下列程序的输出显示结果是 #include <stdio.h> struct abc { int a,b; int c; }; main() { struct abc s[2]={{1,2,3},{4,5,6}}; int t; t=s[0].a+s[1].b; printf("%d",t); }

A.5

B.6

C.7

D.8


参考答案和解析
emoclew emoclew

相关考题:

下面程序运行后的输出结果是( )。struct abc{int a,b,c;}main(){struct abc s[2]={{1,2,3},{4,5,6}};int t;t=s[0].a+s[1].b;printf("%d\n",t);}A.5 B.6 C.7 D.8

下列程序的输出结果是()。includeint b=2;int func(int*A){b+=*a;return b;}main(){int 下列程序的输出结果是( )。 #include<stdio.h> int b=2; int func(int*A){ b+=*a;return b;} main() { int a=1,t=2; t+=func(a); printf("%d\n",t); }A.4B.5C.6D.8

下列程序的输出结果是【 】。include void swap(int *a, int *B) { int *t; t=a;a=b;b=t; 下列程序的输出结果是【 】。include <stdio.h>void swap(int *a, int *B){int *t;t=a;a=b;b=t;}main(){int i=3,j=5,*p=i,*q=j;swap(p,q);printf("%d %d\n",*p,*q);}

下列程序的输出结果是( ) struct abc { int a,b,c;}; main() { struct abc s[2]={{1,2,3},{4,5,6}}; int t; t=s[0].a+s[1].b; printf("%d\n",t); }A.3B.4C.5D.6

下面程序的运行结果是( )。include define SlZE 12 main() {char s[SIZE];int i;for(i=0 下面程序的运行结果是( )。include<stdio.h>define SlZE 12main(){char s[SIZE];int i;for(i=0;i<SIZE;i++) s[i]='A'+i+32;sub(s,5,SIZE-1);for(i=0;i<SIZE;i++)printf("%c",s[i]);printf("\n");}sub(char *a,int t1,int t2){ char ch;while(t1<t2){ ch=*(a+t1);*(a+t1)=*(a+t2);*(a+t2)=ch;t1++;t2--;}}

下列程序的输出结果是()。includestruct abc{int a, b, c, s;};main(){struct abc s[2] 下列程序的输出结果是( )。 #include <stdio.h> struct abc { int a, b, c, s;}; main() { struct abc s[2]={{1,2,3},{4,5,6}}; int t; t=s[0].a+s[1].b; printf("%d\n",t); }A.5B.6C.7D.8

下列程序的输出结果是()。 include int b=2; int fune(int*a) {b+=*a;return b;} main( 下列程序的输出结果是( )。 #include<stdio.h> int b=2; int fune(int*a) { b+=*a;return b;} main() { int a=1,t=2; t+=func(a); printf("%d\n",t); }A.4B.5C.6D.8

下列程序的运行结果是()。includevoid fun(int*s,int*p){ static int t=3;*p=s[t];t--; 下列程序的运行结果是( )。#include<stdio.h>void fun(int*s,int*p){ static int t=3; *p=s[t]; t--;}void main(){ int a[]={2,3,4,5),k; int x; for(k=0;k<4;k++) { fun(a,x); printf("%d,",x); }}A.5,4,3,2B.2,3,4,5,C.2,2,2,2,D.5,5,5,5,

有以下程序: 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 STU s[2]={{20041,703},{20042,580}}; f(s[0]); printf("%d%3.0t\n",s[0].num,s[0].TotalScore); } 程序运行后的输出结果是 ______。A.20045 537B.20044 550C.20042 580D.20041 703

下列程序的运行结果是()。 include voidfun(int*s,int*p) {static int t=3; *p=s[t]; t 下列程序的运行结果是( )。#include<stdio.h>voidfun(int*s,int*p){ static int t=3;*p=s[t];t--;}void main(){ int a[]={2,3,4,5},k;int x;for(k=0;k<4;k++){ fun(a,x);printf("%d,",x);}}A.5,4,3,2B.2,3,4,5,C.2,2,2,2,D.5,5,5,5,

以下程序运行后的输出结果是()。includevoid reverse(int a[],int n){int i,t;for(i=0; 以下程序运行后的输出结果是( )。 #include<stdio.h> void reverse(int a[],int n) {int i,t; for(i=0;i<n/2;i++) {t==a[i];a[i]=a[n-1-i];a[n-1-i]=t;} } main() {int b[10]={10,9,8,7,6,5,4,3,2,1};int i,s=0; reverse(b,10); for(i=0;i<3;i++)s+=b[i]; printf("%d\n",s); }A.27B.6C.25D.30

下列程序的运行结果为【】。 include include {int a; char b[10]; double c;}; 下列程序的运行结果为【 】。include<stdio.h>include<string.h>{ int a; char b[10]; double c; };void f (struct A *t);main(){ struct A a={1001,"ZhangDa",1098.0};f(a) ; printf("%d,%s,%6.lf\n",a.a,a.b,a.C);}void f(struct A*t){ strcpy(t->b, "ChangRong");}

以下程序的输出结果是【 】。include int fun(int x) {static int t=0; return(t+=x); } 以下程序的输出结果是【 】。include <stdio.h>int fun(int x){ static int t=0;return(t+=x);}main()int s,i;for(i=1 ;i<=5;i++) s=fun(i);printf("%d\n",s);

下列程序的输出结果是( )。 include main() { struct st { int y,x,z; }; union {long 下列程序的输出结果是( )。 #include <stdio.h> main() { struct st { int y,x,z; }; union { long i; int j; char k; } un; printf("%d,%d\n",sizeof(struct st),sizeof(un)); }A.6, 2B.6, 4C.8, 4D.8, 6

请选出以下程序的输出结果includemain(){ int a[]={1,2,3,4},i;int x=0;for(i=0;i 请选出以下程序的输出结果 #include<stdio.h> main() { int a[]={1,2,3,4},i; int x=0; for(i=0;i<4;i++) { sub(a,x);printf("%d",x);} printf("\n");} sub(s,y) int*s,y; { static int t=3; y=s[t];t--; }A.1 2 3 4B.4 3 2 1C.0D.4444

设有下列程序: include include main() { int i; char si 10],ti 10]; gets( 设有下列程序:include<stdio.h>include<string.h>main(){ int i;char si 10],ti 10];gets(t);for(i=0;i<2;i++){ gets(s);if(strcmp(t,s)<0)strcpy(t,s);}printf("%s\n",t);}程序运行后,从键盘上输入(<CR>代表回车符):CDEF<CR>BADEF<CR>QTHRG<CR>,则程序的输出结果是______。

有如下程序段struct abc{ int a, b, c, s;};main(){ struct abc s[2]={{1,2,3},{4,5,6}}; int t; t=s[0].a+s[1].b; printf("%d\n",t);}程序运行后输出的结果是A.5 B.6 C.7 D.8

以下程序的输出结果是【】。 include main() {struct stru {int a; float b; char d[4]; } 以下程序的输出结果是【 】。include<stdio.h>main(){ struct stru{ int a;float b;char d[4];};printf("%d\n",sizeof(struct stru));}

有下列程序: include void fun(int * s,int n1,int n2) { int i,j, 有下列程序: #include <stdio.h> void fun(int * s,int n1,int n2) { int i,j,t; i=n1;j=n2; while(i<j){t=s[i];s[i]=s[j];s[j]=t;i++;j--;} } main() { int a[10]={1,2,3,4,5,6,7,8,9,0},k; fun(a,0,3); fun(a,4,9);fun(a,0,9); for(k=0;k<10;k++)printf("%d",a[k]);printf("\n"); } 程序的运行结果是( )。A.987654321B.4321098765C.5678901234D.987651234

以下程序的输出结果是()。includevoid reverse(int a [],int n){int i,t; for(i=0;i 以下程序的输出结果是( )。 #include <stdio.h> void reverse(int a [],int n) { int i,t; for(i=0;i<n/2;i++) { t=a[i]; a[i]=a[n-1 -i];a[n-1-i] =t;} } main() { int b[10]={1,2,3,4,5,6,7,8,9,10};int i,s=0; reverse(b,8); for(i=6;i<10;i++)s+=b[i]; printf("%d\n",s); }A.22B.10C.34D.30

有以下程序:includeint f(int t[],int n);main(){int a[4]={1,2,3,4},s;s=f(a,2);prin 有以下程序: #include<stdio.h> int f(int t[],int n); main() {int a[4]={1,2,3,4},s; s=f(a,2);printf("%d\n",s); } int f(int t[],int n) {if((n>0)(n<5))return t[n+1]+f(t,n-1); else return 0; } 程序运行后的输出结果是( )。A.4B.7C.10D.61

下面程序运行后的输出结果是______。 struct abc { int a,b,c; } main() { struct abc s [2]={{1,2,3},{4,5,6}}; int t=-s[0].a+s[1].b; printf("%d\n",t); }A.5B.6C.7D.8

请选出以下程序的输出结果_______。 includesub(int*s,inty){ static int t=3,y=s[t];t 请选出以下程序的输出结果_______。 #include<stdio.h> sub(int*s,inty) { static int t=3, y=s[t];t-; } main() { int a[]={1,2,3,4},i,x=0; for(i=0;i<4;i++){ sub(a,x);printf("%d",x);} printf("\n"); }A.1234B.4321C.0D.4444

有以下程序:struct S{int n;int a[20];};void f(struct S*P){int i,j,t;for(i=0;in-1;i++)fo 有以下程序: struct S{int n;int a[20];}; void f(struct S*P) { int i,j,t; for(i=0;i<P->n-1;i++) for(j=j+1;j<P->n-1;j++) if(p->a[i]>p->a[j]) {t=P->a[i];p->a[i]=P->a[j];p->a[j]=t} } main() {int i;struct S s{10,{2,3,1,6,8,7,5,4,10,9}}; f(&s); for(i=0;i<s.n;i++)printf("%d",s.a[i]);} 程序运行后的输出结果是( )。A.3B.4C.5D.6

请选出以下程序的输出结果()。includesub(int *s,int y){static int t=3; y=s[t];t--;} 请选出以下程序的输出结果( )。 #include <stdio.h> sub(int *s,int y) { static int t=3; y=s[t];t--; } main() { int a[]={1,2,3,4},i,x=0; for(i=0;i<4;i++) { sub(a,x);printf("%d",x); } printf("\n"); }A.1234B.4321C.0D.4444

有以下程序:include struct STU{char name[10]; int num; int Score;};main(){struct 有以下程序: #include <stdio.h> struct STU { char name[10]; int num; int Score; }; main() { struct STU s[5]={{"YangSan",20041,703},{"LiSiGuo",20042,580}, {"WangYin",20043,680},{"SunDan",20044,550}, {"Penghua",20045,537}}, *p[5],*t; int i,j; for(i=0;i<5;i++) p[i]=s[i]; for(i=0;i<4;i++) for(j=i+1;j<5;j++) if(p[i]->Score>p[j]->Score) { t=p[i];p[i]=p[j];p[j]=t;} printf("%d%d\n",s[1].Score,p[1]->Score); } 执行后的输出结果是( )。A.550 550B.680 680C.580 550D.580 680

若有如下程序: sub(int *t,int a[3][4]) { int m,n; for(m=0;m<3;m++) for(n=0;n<4;n++) { *t=a[m][n];t++;} } main() { int*t,s[3][4)={{1,2,3),{4,5,6),{7,8,9}}; t=(int*)malloc(50); sub(t,s); printf("%d,%d\n",t[4],t[7]); } 则程序运行后的输出结果是( )。A.4,7B.4,0C.5,8D.程序错误

单选题有以下程序:#include int f(int t[],int n);main(){ int a[4]={1,2,3,4},s; s=f(a,4); printf(%d,s);}int f(int t[],int n){ if(n0)return t[n-1]+f(t,n-1); else return 0;}程序运行后的输出结果是(  )。A4B10C14D6