单项选择题

有以下程序:
#include <stdio.h>
void f(int a[],int i, int j)
int t;
if(i<j)
t=a[i];a[i]=a[j];a[j]=t;
f(a,i+1,j-1);

main()
int i,aa[5]=1,2,3,4,5;
f(aa,0,4);
for(i=0;i<5;i++) printf("%d,",aa[i]);printf("\n");
执行后的输出结果是( )。

A.5,4,3,2,1,
B.5,2,3,4,1,
C.1,2,3,4,5,
D.1,5,4,3,2,
<上一题 目录 下一题>
热门 试题

单项选择题
有以下程序: #include <stdio.h> main() char k; int i; for(i=1;i<3;i++) scanf( %c ,&k); switch(k) case ’0’: printf( another n ); case ’1’: printf( number n ); 程序运行时,从键盘输入:01<回车>,程序执行后的输出结果是( )。
A.another
number
B.another
number
another
C.another
number
D.number
number
单项选择题
有以下程序: #include <stdio.h> void swap1(int c[]) int t; t=c[0]; c[0]=c[1]; c[1]=t; void swap2(int c0,int c1) int t; t=c0; c0=c1; c1=t; main() int a[2]=3,5,b[2]=3,5; swap1(
A.; swap2(b[0],b[1]);
相关试题
  • 下面程序的运行结果是 【18】 。 #in...
  • 下面rotate函数的功能是:将n行n列的矩阵A...
  • 有以下语句段: int n1=10,n2=2...
  • 以下sstrcpy()函数实现字符串复制,即将t...
  • 以下程序的运行结果是 【17】 。 #in...