单项选择题
有以下程序: #include <stdio.h> void sum(int *a) { a[0]=a[1]; } main() { int aa[10]={1,2,3,4,5,6,7,8,9,10},i; for(i=2;i>=0;i--) sum(&aa[i]); printf("%d\n",aa[0]); } 执行后的输出结果是( )。
A.4
B.3
C.2
D.1
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
有以下程序: #include <stdio.h> char fun(char x,char y) { if(x<y) return x; return y; } main() { int a='9',b='8',c='7'; printf( %c n ,fun(fun(a,b),fun(b,c))); } 程序的执行结果是( )。
A.函数调用出错
B.8
C.9
D.7
点击查看答案&解析
单项选择题
对长度为n的线性表进行顺序查找,在最坏情况下所需要的比较次数为( )。
A.n+1
B.n
C.(n+1)/2
D.n/2
点击查看答案&解析
相关试题
下面程序的功能是输出以下形式的金字塔图案...
有以下程序: #include <stdio.h> s...
B
有以下程序: #include <stdio.h> s...
有以下程序: #include <stdio.h> m...