单项选择题

下列程序的输出结果是( )。
#include<stdio.h>
int fun(intx)
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> 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,2
B.6,4
C.8,4
D.8,6
单项选择题
下列程序的运行结果是( )。 #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,2
B.2,3,4,5,
C.2,2,2,2,
D.5,5,5,5,
相关试题
  • 下列程序的输出结果是______。 #de...
  • 写出下列程序的输出结果______。 ma...
  • 设有下列的程序段: char str[]= Hel...
  • 设有下列程序: #include<stdio.h> ...
  • 若有定义int a[4][4]=1,2,3,...