用C语言怎么将两个字符串连接起来?

2025-03-01 11:07:27
推荐回答(1个)
回答1:

这些是宏的功能。

#是将一个参数转换为字符串。##可以连接字符串

比如这样:

#include

#define STR(a,b) a##b

int main()

{

printf("%s\n",STR("123","456"));

return 0;

}