单项选择题

以下程序的输出结果是( )。
long fun(int n)
long s;
if(n==1||n==2)s=2;
else s=n-fun(n-1);
return s:

void main()
printf("%1d\n",fun(3));

A.1
B.2
C.3
D.4
<上一题 目录 下一题>
热门 试题

单项选择题
下面程序的输出结果是( )。 #define a 121 const b=12; enum ca1,a2; void main() printf( %d,%d,%d ,sizeof(a) ,sizeof(b),sizeof(enum C));
A.121,0,4
B.4,4,4
C.0,2,4
D.0,2,2
单项选择题
有以下程序: #include<stdio.h> void main() char s[][5]='*','*','','*','*','','','','*','*','','*','*'; int i,j, for(i=0;i<5;i++) for(j=0;______;j++) printf( %c ,s[i][j]); printf( n ); 若输出如下的钻石形平面图,则在程序的下划线处应填入的表达式是( )。 * * * * * * * *
A.j<5
B.j<=5
C.j>5
D.j>=5
相关试题
  • 有以下程序: #include <stdlib.h> ...
  • 有以下程序: struct STU char name[...