# include <stdio.h>
#define LEN 1000
char * my_strcat(char *dest, const char *src)
{
char *cur = dest;
while (*dest != '\0')
{
dest++;
}
while (*dest = *src)
{
dest++;
src++;
}
return cur;
}
int main(void)
{
char a[LEN] = "qwe";
char *b = "asd";
printf("%s\n", my_strcat(a, b));
return 0;
}
字符串拼接函数
最新推荐文章于 2024-07-11 10:09:16 发布