在C语言中,可以使用strcat()函数将两个字符串连接起来。例如:
#include <stdio.h>#include <string.h>int main() { char str1[50] = "Hello, "; char str2[] = "world!"; strcat(str1, str2); printf("Concatenated string: %s\n", str1); return 0;}运行上面的代码,输出将会是:
Concatenated string: Hello, world! 



