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