主页
C 语言
C 字符串函数
demo_strings_strcat
运行 ❯
×
更改方向
保存代码
更改主题
#include
#include
int main() { char str1[20] = "Hello "; char str2[] = "World!"; // Concatenate str2 to str1 (the result is stored in str1) strcat(str1, str2); // Print str1 printf("%s", str1); return 0; }
Hello World!