更多“下列程序的运行结果是()。#include<stdio.h>…”相关的问题
第1题
下面程序段的运行结果是 。 #include "stdio.h" void main( ) { int a=1, b=2,c=2,t; while (a <c) {t="a;a=b;b=t;c--;}" printf("%d,%d,%d",a,b,c);> A、2,1,0
B、1,2,1
C、1,2,0
D、2,1,1
E、1,1,1
点击查看答案
第2题
以下程序的运行结果是( )。 #include "stdio.h" main( ) { int a=24,b=16,c; c=abc(a,b); printf("%d",c); } int abc(int u,int v) { int w; while(v) { w=u%v;u=v;v=w; } return u; }
点击查看答案
第3题
以下程序的输出结果是()。 #include "stdio.h" int main() { int x=1,a=0,b=0; switch(x) { case 0:b++; case 1:a++; case 2:a++;b++; } printf("a=%d,b=%d\n",a,b); return 0; }
A、a=2,b=1
B、a=1,b=1
C、a=1,b=0
D、a=2,b=2
点击查看答案
第4题
以下程序的输出结果是( )。
#include<stdio.h>
#include<math.h>
main()
{int a=1,b=4,c=2;
float x=10.5,y=4.0,z;
z=(a+b)/c+sqrt((double)y)*1.2/c+x;
pritnf("%f\n",z);}
A.14.000000 B.015.400000
C.13.700000 D.14.900000
点击查看答案
第5题
下面程序的运行结果是()。
include<stdio.h>
main()
{int a=25;
fun(&A);
}
fun(int *x)
{ printf("%d\n",++*x);
}
点击查看答案
第6题
下列程序的输出结果是16.00,请在程序中填空。 #include "stdio.h" main( ) { int a=9,b=2; float x=________ , y=1.1,z; z=a/2+b*x/y+1/2; printf("%5.2f", z ); }
点击查看答案
第7题
有下列程序: #include " stdio.h" main() { int x=0; int y=0; while (x<7&&++y) { y--; x++;} printf("%d,%d",y,x); } 程序的输出结果是()。
点击查看答案
第8题
#include"stdio.h" int main( ) {int x=1,a=0,b=0; switch(x) {case 0:b++; case 1:a++; case 2:a++;b++; } printf("%d,%d",a,b); return 0; } 该程序的输出结果是( )
点击查看答案
第9题
下面程序段执行后的输出结果是( )。 int a; char c=10; float f=100.0; double x; a=f/=c*=(x=6.5); printf("%d└┘%d└┘%3.1f└┘%3.1f",a,c,f,x);
A、1└┘65└┘1└┘6.5
B、1└┘65└┘1.5└┘6.5
C、1└┘65└┘1.0└┘6.5
D、2└┘65└┘1.5└┘6.5
点击查看答案
第10题
有以下程序: #include <stdio.h> main() { int a[] = {2,4,6,8,10} ,y =0,x, * p; p =&a[1]; for(x=1;x<3;x++)y+ =p[x]; printf("% d \n" , y); }程序运行后的输出结果是()。
点击查看答案