单选题 C语言
题号 #2329039

有以下程序
#include <stdio.h>
void f(char p[][10], int n )  /*  字符串从小到大排序  */
{
char t[10];      int i,j;
for(i=0;i<n-1;i++)
for(j=i+1;j<n;j++)
if(strcmp(p[i],p[j])>0) 
{
strcpy(t,p[i]); 
strcpy(p[i],p[j]); 
strcpy(p[i],t);              
}
}
main()
{
char p[5][10]={ "abc","aabdfg","abbd","dcdbe","cd"};
f(p,5);
printf("%d\n",strlen(p[0]));
}
程序运行后的输出结果是(  )

进入在线模考

参考答案

C

答案解析

暂无解析

你可能感兴趣的试题

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