单项选择题

有以下程序
#include<stdio.h>
intfun(int a,int b)
if(b=0)return a;
else return(fun(--a,--b));
main()
pdntf("%d\n",fun(4,2));
程序的运行结果是( )。

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

单项选择题
设有如下的程序段: char str[]= HelloWorld ; char*ptr; ptr=str; 执行上面的程序段后,*(ptr+10)的值为( )。
A.'\0'
B.'0'
C.不确定的值
D.'0'的地址
单项选择题
以下程序的输出结果是( )。 #include<stdio.h> void prt(int *x,int *y,int *z) printf( %d,%d,%d n ,++*x,++*y,*(z++)); main() inta=10,b=40,c=20; prt(&a,&b,&c); prt(&a,&b,&c);
A.11,42,31
12,22,41
B.11,41,20
1,42,20
C.11,21,40
11,21,21
D.11,41,21
12,42,22
相关试题
  • 下面程序的运行结果是______。 #de...
  • 有以下程序 #include<stdio.h> typed...
  • 下面程序的运行结果是______。 #in...
  • 下列函数从字符数组s[]中删除和c一样的字...
  • 以下程序的功能是:对输入的一行字符中的数...