单选题 C语言
题号 #143183

有以下程序
#include <stdio.h>
#include <string.h>
void fun(char s[][10],int n)
{char t; int i,j;
for(i=0;i<n-1;i++)
for(j=i+1;j<n;j++)
/*比较字符串的首字符大小 ,并交换字符串的首字符*/
if(s[i][0]<s[j][0]) {t=s[i][0];s[i][0]=s[j][0];s[j][0]=t;}
}
main()
{char ss[5][10]={“bcc”,”bbcc”,”xy”,”aaaacc”,”aabcc”};
fun(ss,5); printf(“%s,%s\n”,ss[0],ss[4]);
}
程序的运行结果是(    )。

进入在线模考

参考答案

D

答案解析

暂无解析

你可能感兴趣的试题

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