网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

下面程序段执行后的输出结果是()。 int a=1,b=2,c=3,t; while (a<b<c){ t=a;a=b;b=t;c--; } printf("%d,%d,%d",a,b,c);

A.1,2,0

B.2,1,0

C.1,2,1

D.2,1,1


参考答案和解析
A
更多 “下面程序段执行后的输出结果是()。 int a=1,b=2,c=3,t; while (a<b<c){ t=a;a=b;b=t;c--; } printf("%d,%d,%d",a,b,c);A.1,2,0B.2,1,0C.1,2,1D.2,1,1” 相关考题
考题 有以下程序#include stdio.hmain(){ int a=5,b=1,t;t=(a2)|b; printf("%d\n",t);}程序运行后的输出结果是A)21B)11C)6D)1

考题 下面程序运行后的输出结果是( )。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

考题 有以下程序:void main(){int t=1,i=5; for( ;i=0;) i--;t*=i; printf("%d\n",t);}执行后输出结果是。

考题 有下列程序: main() { int t,a=1,b=5,c=-2; while(a>b>C) { t=a;a=b;b=t;c++;} printf("%d,%d,%d",a,b,c); } 程序的输出结果是( )。A.1,5,0B.1,5,-2C.5,1,-1D.5,1,-2

考题 下列程序的输出结果是()。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

考题 (39)有以下程序#include stdio.hmain(){ int a=5,b=1,t;t=(a2|b); printf(“%d\n”,t)}程序运行后的输出结果是A)21 B)11 C)6 D)1

考题 下面程序段的运行结果是void main(){int t,a,b,c;a=1;b=2;c=2:while(a{t=a;a=b;b=t;c--;}cout }A.1,2,0B.2,1,0C.1,2,1D.2,1,1

考题 下列程序执行的结果是()。A=1;b=2;c=3;While(bac){t=a;a=b;b=t;c--;}printf(“%d,%d,%d”,a,b,c); A.1,2,0B.2,1,0C.1,2,1D.2,1,1

考题 有下列程序:main{int i,s=0,t[]={1,2,3,4,5,6,7,8,9};for(i=0;i9;i+=2)s+=*(t+i);printf(9;i+=2)s+=*(t+i);printf(%d\n,s);}程序执行后的输出结果是( )。A.A.45B.20C.25D.36

考题 下面程序段的运行结果是 void main() { int t,a,b,c; a=1;b=2;C=2; while(a<b<c) { t=a;a=b;b=t;c--;} cout << a << " ," << b << " ," << c; }A.1,2,0B.2,1,0C.1,2,1D.2,1,1

考题 下列程序的输出结果是【 】。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

考题 下列程序的输出结果是( )。 #includestdio.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 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--;}}

考题 有以下程序 main() {int i,t[][3]={9,8,7,6,5,4,3,2,1}; for(i-0;i<3;i++) printf("%d",t[2-i][i]); } 程序执行后的输出结果是______。A.753B.357C.369D.751

考题 若有如下程序: main() {int a=0,t=0; while(!a!=0) t+=a++; printf("%d,%d\n",t,A) ; } 则程序运行后的输出结果是( )A.0,1B.1,0C.0,0D.1,1

考题 有以下程序includemain(){int a=5,b=lt; t=(a 有以下程序 #include<stdio.h> main() { int a=5,b=lt; t=(a<<2)|b;printf("%d\n",t); } 程序运行后的输出结果是______。A.21B.11C.6D.1

考题 有如下程序段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

考题 有下列程序 main() { int t, a=1, b=5, c=-2; while(a>b>c) { t=a; a=b; b=t; c++;} printf("%d, %d, %d", a, b, c); } 程序输出的结果是( )。A.1, 5, 0B.1, 5, -2C.5, 1, -1D.5, 1, -2

考题 下面程序的运行结果是#include #define SIZE 12sub(char *a,int t1,int t2) { char ch; while(t1t2) { ch=*(a+t1); *(a+t1)=*(a+t2); *(a+t2)=ch; t1++;t2--; }} main() { char s[SIZE]={’A’,’B’,’C’,’D’,’E’,’F’,’G’,’H’,’I’,’J’,’K’,’L’}; int i; sub(s,7,SIZE-1); for(i=0;iSIZE;i++) printf("%c ",s[i]); printf("\n");}

考题 下面程序运行后的输出结果是______。 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

考题 下列程序段的执行结果是______。 int i=0; while(i++<=2) printf("%d\t",i);A.1 2 3B.1 2C.1D.无结果

考题 若有如下程序: int s[3] [3]={'a','b','C','d','e','f','g','h','i'},*t; main() {t:(int*)malloc(sizeof(int)); sub(t,s); printf("%c\n",*t); } sub(int*p,int b[][3]) {*p=b[2][1]; } 则程序运行后的输出结果是( )。A.dB.eC.hD.b

考题 有以下程序main(){ int t=1,i=5;for( ; i>=0; i--) t*=i;printf("%d\n",t);}执行后输出结果是【 】。

考题 下面程序段的输出结果是() int x=3; do{printf("%3d",x-=2);}while(!(--x));A、1;2B、3;2C、2;3D、1;-2

考题 有以下程序 void f(int v,int w) { int t; t=v; v=w; w=t; } main() { int x=1,y=3,z=2; if(xy) f(x,y); else if(yz) f(y,z); else f(x,z); printf("%d,%d,%d/n",x,y,z); }执行后输出结果是()A、1,2,3B、3,1,2C、1,3,2D、2,3,1

考题 单选题有以下程序:#includemain(){ int a=5,b=1,t; t=(a2)|b; printf(%d,t);}程序运行后的输出结果是(  )。A 21B 11C 6D 1

考题 单选题有以下程序      main( )  {int i,t[][3]={9,8,7,6,5,4,3,2,1};          for(i=O;i3;i++)  printf(“%d”,t[2-i][i]);      }  程序执行后的输出结果是()A 753B 357C 369D 751