单项选择题
以下程序运行后的输出结果是
#include<stdio.h>
int f(int t[], int n);
main()
int a[4]=1, 2, 3, 4, s;
s=f(a, 4); printf("%d\n", s);
int f(int t[], int n)
if(n>0) return t[n-1]+f(t, n-1);
else return 0;
A.4
B.10
C.14
D.6
热门
试题
单项选择题
以下程序运行后的输出结果是 #include<stdio.h> #define N 8 void fun(int *x, int i)*x=*(x+i); main() int a[N]=1, 2, 3, 4, 5, 6, 7, 8, i; fun(a, 2); for(i=0; i<N 2; i++) printf( %d , a[i]); printf( n );
A.1313
B.2234
C.3234
D.1234