单选题 C语言
题号 #2274217

有以下程序:
#include<stdio.h>
main(  )
{ char a[5][10]={"one","tw0","three","four","five"};
 int i,j;
 char t:    、
 for(i=0;i<4;i++)
  for(j=i+1;j<5;j++)   
   if(a[i][O]>a[j][0])
   {t=a[i][O];a[i][O]=a[j][O];a[j][O]=t;)
 puts(a[1]);
}
程序运行后的输出结果是(  )。

进入在线模考

参考答案

A

答案解析

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

你可能感兴趣的试题

找试题 · 找答案 · 找资料 在线模考