单项选择题

设有如下函数定义
int fun(int k)
if(k<1) return 0;
eise if(k==1) return 1;
else return fun(k-1)+1;
若执行调用语句:n=fun(3);,则函数fun总共被调用的次数是______。

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

单项选择题
有以下程序 #include<stdio.h> main() (char a[3 0], b[30]; scanf( %s , a); gets(b); printf( %s n%s n , a, b); 程序运行时若输入: how are you I am fine<回车> 则输出结果是()。

A. how are you
I am fine
B. how
are you I am fine
C. how are you I am fine
D. how are you

单项选择题
以下函数的功能是:通过键盘输入数据,为数组中的所有元素赋值。 #include<stdio.h> #define N 10 void fun(int x[N]) int i=0; while (i<N)scanf( %d ,______) 在程序中下画线处应填入的是______。
A.x+i
B.&x[i+1]
C.x+(i++)
D.&x[++i]
相关试题
  • 有以下程序 #include<stdio.h> int ...
  • 有以下程序 #include<stdio.h> void...
  • 有以下程序 #include<stdio.h> int ...
  • 有以下程序: #include<stdio.h> mai...
  • 有以下程序 int i, n; for(i=0;...