#include
voidstrcpy(char*s1,char*s2)
{
if(s1==null||s2==null)return;
while(*s2!="\0")*s1++=*s2++;
*s1="\0";
}
voidstrcat(char*s1,char*s2)
while(*s1!="\0")s1++;
intmain(void)
chars1[100]="abcd";
chars2[100]="1234";
chars3[100]="uvwxyz";
strcat(s1,s2);
strcpy(s2,s3);
printf("%s\n",s1);
printf("%s\n",s2);
return0;
#include
voidstrcpy(char*s1,char*s2)
{
if(s1==null||s2==null)return;
while(*s2!="\0")*s1++=*s2++;
*s1="\0";
}
voidstrcat(char*s1,char*s2)
{
if(s1==null||s2==null)return;
while(*s1!="\0")s1++;
while(*s2!="\0")*s1++=*s2++;
*s1="\0";
}
intmain(void)
{
chars1[100]="abcd";
chars2[100]="1234";
chars3[100]="uvwxyz";
strcat(s1,s2);
strcpy(s2,s3);
printf("%s\n",s1);
printf("%s\n",s2);
return0;
}