先看下面一段程序: #include <stdio.h> #include <stdlib.h> #define STR(s) #s #define CONS(a,b) (int)(a##e##b) int main() { printf(STR(abcde)); printf("\n"); printf("%d\n",CONS(2,3)); return 0; } 复制代码 程序的输出是: abcde 2000 原因: 我们使用#把宏参数变为一个字符串。用##把俩个宏参数贴合在一起。CONS(2,3)的值实际上是2e3。但是要求输出十进制。转换成就为2000