#include <string.h>
#include <stdio.h>
char *jstrcat(char *des, char *src)
{
char *p;
p = des;
while(*p++);
p--;
while(*src != '\0')
{
*p++ = *src++;
}
*p = '\0';
return p;
}
int main()
{
char *p;
char *str1 = "test1";
char *str2 = "test2";
char *str3 = "test3";
char *str4 = "test4";
char buffer[1024]={0,};
p = buffer;
p = jstrcat(p,str1);
p = jstrcat(p,str2);
p = jstrcat(p,str3);
p = jstrcat(p,str4);
printf("%s\n",buffer);
}