题目内容:
以下程序中函数sort的功能是对a数组中的数据进行由大到小的排序 voidsort(inta[],intn)
{inti,j,t;
for(i=0;i
for(j=i+1;j
if(a[i]
}
main()
{intaa[10]={1,2,3,4,5,6,7,8,9,10},i;
sort(&aa[3],5);
for(i=0;i<10;i++)printf("%d,",aa[i]);
printf("\n");
}
程序运行后的输出结果是 A.1,2,3,4,5,6,7,8,9,10,
B.10,9,8,7,6,5,4,3,2,1,
C.1,2,3,8,7,6,5,4,9,10,
D.1,2,10,9,8,7,6,5,4,3,
参考答案:
答案解析: