单项选择题
下列程序的运行结果是( )。
main()
int a=-5,b=1,c=1;
int x=0,y=2,z=0;
if(c>0) x=x+y;
if(a<=0)
if(b>0)
if(c<=0) y=x-y;
else if(c>0) y=x-y;
else z=y;
printf("%d,%d,%d\n",x,y,z);
A.2,2,0
B.2,2,2
C.0,2,0
D.2,0,2
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
下列程序的输出结果是( )。 #include<stdio.h> int fun(int x) int a; if(x==0‖x==1) return 3; else a=x-fun(x-2) ; return a; void main() printf( %d ,fun(7) );
A.2
B.8
C.9
D.5
点击查看答案&解析
单项选择题
下列程序的运行结果是( )。 #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,2
B.2,3,4,5,
C.2,2,2,2,
D.5,5,5,5,
点击查看答案&解析
相关试题
下列程序的输出结果是( )。 #include...
下列程序的运行结果是( )。 #include...