不是比较字母的大小写,而是比较字母的顺序,比如说一组字母是 dheng 然后排序。。。谢谢各位高手
#define M 100
#define N 10
#include<string.h>
#include<stdio.h>
main()
{ int i,j,k;
char a[M]="def",b[N]="abc",temple;
puts(a);
printf("\n");
puts(b);
printf("\n");
strcat(a,b);
puts(a);
printf("\n");
k=strlen(a);
for(i=0;i<k;i++)
{ for(j=0;j<k-i;j++)
{ if(a[j]>a[j+1])
{ temple=a[j];
a[j]=a[j+1];
a[j+1]=temple;
}
}
}
puts(a);
printf("\n");
}
这是我编的
编译的时候没有报错
但是出不了结果