c语言怎么把三个字符串连起来
-
c语言怎么把三个字符串连起来
可以使用strcat函数将三个字符串连接在一起,示例如下:#include #include int main() {char str1[50] = “Hello, “;char str2[] = “world”;char str3[] = “!”;strcat(str1, str2);strcat(str1, str3);printf(“%s\n”, s
可以使用strcat函数将三个字符串连接在一起,示例如下:#include #include int main() {char str1[50] = “Hello, “;char str2[] = “world”;char str3[] = “!”;strcat(str1, str2);strcat(str1, str3);printf(“%s\n”, s