#include<stdio.h>
#include<string.h>
char* mycat(char* s1,const char* s2)
{
char *ret=s1;
while(*s1!='\0')
{
*s1++;
}
while(*s1++=*s2++);
*s1='\0';
return ret;
}
int main()
{
char s1[]="abcd";
char s2[]="Abcd";
//strcat(s1,s2);·
printf("%s\n",mycat(s1,s2));
return 0;
}
Stardust1001
相关分类