#include <string.h>
char *strcat( char *str1, const char *str2 );
函数将字符串 str2 连接到 str1 的末端,并返回指针 str1。
#include <string.h>
#include <stdio.h>
int main(void)
{
char destination[25];
char *blank = " ", *c = "C++", *Borland = "Borland";
strcpy(destination, Borland);
strcat(destination, blank);
strcat(destination, c);
printf("%s\n", destination);
return 0;
}输出结果:
Borland C++