单选题:有以下程序int fun(int x[],int n){static int sum=0,i;for(i=0;i<n;i

  • 题目分类:C语言
  • 题目类型:单选题
  • 查看权限:VIP
题目内容:
有以下程序
int fun(int x[],int n)
{static int sum=0,i;
for(i=0;i<n;i++) sum+=x[i];
return sum;
}
main()
{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
参考答案:
答案解析:

Another important way to prolong the life of cut flowers is

Another important way to prolong the life of cut flowers is ____________________

查看答案

The aging of cut flowers can be slowed down_________________

The aging of cut flowers can be slowed down_________________

查看答案

若有以下说明和定义 uniondt { inta;charb;doublec; }data; 以下叙述中错误的是( )

若有以下说明和定义 uniondt { inta;charb;doublec; }data; 以下叙述中错误的是( )A.data的每个成员起始地址都相同 B.

查看答案

有以下程序 main() { intc=35;printf("%d\n",c&c); } 程序运行后的输出结果是( )

有以下程序 main() { intc=35;printf("%d\n",c&c); } 程序运行后的输出结果是( )A.0 B.70 C.35 D.1

查看答案

有以下程序fun(char p[][10]){int n=0,i;for(i=0;i<7;i++)if(p[i][0]=

有以下程序fun(char p[][10]){int n=0,i;for(i=0;i<7;i++)if(p[i][0]==′T′)n++;return n;}m

查看答案