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

如题所述

这些是宏的功能。

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

比如这样:

#include <stdio.h>

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

int main()

{

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

return 0;

}

温馨提示:内容为网友见解,仅供参考
无其他回答
相似回答