单项选择题
有以下程序:
#include <stdio.h>
int fun(int x[], int n)
static int sum =0,i;
for(i=0;i<n;i ++ )sum + =x[i];
return sum;
int a[] =1,2,3,4,5,b[]=6,7,8,9,s=0;
s = fun(a,5) + fun(b,4) ;printf( "%d \n",s);
程序执行后的输出结果是( )。
A.45
B.50
C.60
D.55
热门
试题
单项选择题
有以下程序: #include <stdio.h> main( ) ehar c1,c2,c3,c4,c5,c6; scanf( % c% c% c% c , &c1, &c2, &c3, &c4); c5 = getehar( ); c6 = getchar( ); putehar(c1); putehar(c2); printf( %c%c n , c5, c6); 23 <回车> 45678 <回车>
A.1267
B.1256
C.1278
D.1245