[求助] 我错咯吗?
#include <stdio.h>
char*str_cat(char s1[],char s2[])
{
int i,j;
for(i=0;s1[i]!='\0';i++)
;
for(j=0;(s1[i]=s2[j])!='\0';i++,j++)
;
return s1;
}
void main()
{
int i;
char s1[]="happy";char s2[]="new year";
str_cat(s1,s2);
for(i=0;s1[i]!='\0';i++)
printf("%s",s1);
}
[此贴子已经被作者于2006-12-19 16:10:22编辑过]