单项选择题

有以下程序:
fun(int x)
int p;
if(x==0‖x=1)return(3);
p=x-fun(x-2);
return p;
main()
printf("%d\n",fun(7);
执行后的输出结果是( )。

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

单项选择题
有以下程序: int fun1(double
A.return a*=a;
int fun2(double x,double y)
double a=0,b=0;
a=fun1(x);b=funl(y); return(int)(a+
B.;
&n
C.5.0
D.0.0
单项选择题
设有如下定义: struct ss char name[10] int age; char sex; std[3],*p=std; 下面各输入语句中错误的是( )。
A.scanf("%d",&(*p).age);
B.scanf("%st",&std.name);
C.scanf("%c",&std[0].sex);
D.scanf("%c",&(p->sex));
相关试题
  • 以下程序中,for循环体执行的次数是 【1...
  • 以下函数fun的功能是返回str所指字符串中以...
  • 以下程序的输出结果是 【14】 。 main...
  • 以下程序中函数huiwen的功能是检查一个字符...
  • 下列程序中的函数stropy2()实现字符串两...