单项选择题
有以下程序:
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
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
有以下程序: #include <stdio.h> void fun(char*a,char*b) while(*a=='*')a++; while(*b=*a)b++;a++; main() char *s= *****a*b**** ,t[80]; fun(s,t);puts(t); 程序的运行结果是
A) *****a*b
B) a*b
C) a*b****
D) ab
点击查看答案&解析
单项选择题
有以下程序: #include <stdio.h> struct st int x,y; data[2]=1,10,2,20; main() struct st*p=data; printf( %d, ,p->y);printf( %d n ,(++p)->x); 程序的运行结果是
A) 10,1
B) 20,1
C) 10,2
D) 20,2
点击查看答案&解析
相关试题
以下程序: main() unsigned char a...
有以下程序: int add (int a,int b...
有以下程序(strcat函数用于连接两个字符串...
有以下程序段: struct st int x; in...
下面结构体的定义语句中,错误的是