单项选择题

有以下程序:
#include <stdio.h>
int fun(int a,int b)
if(b==0) return a;
else return (fun(--a,--b));

main()
printf("%d\n", fun(4, 2));
程序的运行结果是( )。

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

单项选择题
有以下程序: #include <stdio.h> void fun(int a,int b) intt; t=a;a=b;b=t; main() int c[10]= 1,2,3,4,5,6,7,8,9,0,i; for (i=0; i<10; i+=2) fun(c[i],c[i+1]); for (i=0; i<10; i++) printf( %d, ,c[i]); printf( n ); 程序的运行结果是( )。
A.1,2,3,4,5,6,7,8,9,0,
B.2,1,4,3,6,5,8,7,0,9,
C.0,9,8,7,6,5,4,3,2,1,
D.0,1,2,3,4,5,6,7,8,9,
单项选择题
以下结构体类型说明和变量定义中正确的是( )。
A.typedef struct
int n; char c; REC;
REC t1, t2;
B.struct REC;
int n; char c;;
REC t1, t2;
C.typedef struct REC;

int n=0; char c='A'; t1, t2;
D.struct
int n; char c; REC;
REC t1, t2;
相关试题
  • 有以下程序: void sum(int a[]) a...
  • 有以下程序: #include<stdio.h> #d...
  • 有以下程序: void swap1(int c0[]...
  • 下面程序运行后输出的结果是( )。 void...
  • 有以下程序: main() char a[]= a...