Linux学习--- 宏定义下#、##的使用

#    字符串化

##   连接符号 

eg:

 1 #include <stdio.h>
 2 #define ABC(x)    #x 
 3 #define    DAY(c)    myday##c
 4 
 5 int main (){
 6     int myday1 = 10;
 7 
 8     printf(ABC(123a\n));        //"123a\n" 
 9     printf("the day is %d\n",DAY(1));
10     return 0;
11 }         
12 //输出结果:123a
13 //            the day is 10