问题 单项选择题

有以下程序:
# include <stdio.h>
main()
(char a[5][10]="one", "two", "three", "four", "five");
int i, j;
char t;
for(i=0;i<4;i++)
for(j=i+1;j<5;j++)
if (a[i][0]>a[j][0])
t=a[i][0]; a[i][0]=a[j][0]; a[j][0]=t; )
puts(a[1]);

程序运行后的输出结果是( )。

A.fwo

B.fix

C.two

D.owo

答案

参考答案:A

解析:

For循环完成的功能是把二维数组a的第一列的字母按从小到大排序,其他列的字母不变。

填空题
单项选择题