问题
单项选择题
有以下程序
#include
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[j],t);main()
char p[5][10]="abc", "aabdfg", "abbd", "dedbe", "cd";
f(p,5);
printf("%d\n", strlen(p[0]));
程序运行后的输出结果是______。
A.2
B.4
C.6
D.3
答案
参考答案:C