C语言字符函数----strcat(字符串拼接)
函数名:strcat
功 能:字符串拼接
举 例:将first_str与second_str进行拼接!
#include<string.h>
#include<stdio.h>
int main()
{
char first_str[20]=“hello “;
char *second_str=” world”;
printf(“原字符串—%s\n”,first_str);
strcat(first_str,second_str);
printf(“拼接后字符串—%s\n”,first_str);
return 0;
}结果为: