若有以下程序
#include
void fun(int a[ ], int n)
{ int t,i,j;
for (i=1; i a[j]) { t=a[i]; a[i]=a[j];a[j]=t;}
}
main()
{ int c[10]={10,9,8,7,6,5,4,3,2,1},i;
fun(c, 10);
for (i=0;i<10; i++) printf("%d,", c[i]);
printf("\n");
}
则程序的输出结果是
- A.1,10,3,8,5,6,7,4,9,2,
- B.10,9,8,7,6,5,4,3,2,1,
- C.2,9,4,7,6,5,8,3,10,1,
- D.10,1,8,3,6,5,4,7,2,9,
热度🔥1,279
解析:打开微信小程序查看本题解析