急!怎么也不行!
我用以下程序实现查找数组a中的ascii最大的字符,然后在此后插入b字符串,我用尽
各种方法都找不出错误码!
# include "string.h"
main()
{char a[30]="Wzlczome yoxy";
char b[]="hello";
int i=0,temp,j,t=0;
printf("\n%s\n",a);
for(i=0;i<29;i++)
if(a[i]>a[i+1]) temp=i;
printf(" %c ",a[temp]);
j=temp;
for(i=strlen(b)+temp;i<30;i++)
a[i]=a[temp++];
printf("\n%s\n",a);
for(i=j;i<strlen(b)+j;i++)
a[j]=b[t++];
printf("%s",a);
}