//宏定义:宏定义只能做一级传参,凡是有#或者##的地方,不在进行替换
//param:#
//
#define INT_MAX 0x7fffffff;
#define A 3
#define _Fun(x,y) (int)(x##e##y)
#define Str(x) (#x)
#define FUN(x,y) _Fun(x,y)
#define SUM(x,y) (x+y)
int main()
{
char* TestChar = Str(hello);
printf(“num value is:%s\n”, TestChar);
//char* num = Fun(“as”, “cd”);
//printf(“num value is:%s\n”,num);
char* testchar2 = Str(INT_MAX);
printf(“num value is:%s\n”, testchar2);
int Testnum2 = FUN(A,A);
printf(“num value is:%d\n”, Testnum2);
Testnum2 = SUM(A, A);//如果不是#或者##,宏会继续展开
printf(“num value is:%d\n”, Testnum2);
int TestNumber = -1;
if (TestNumber < sizeof(int))
{
printf("Test Numer < sizeof(int)");
}
else
{
printf(" invalid Test Numer < sizeof(int)%d\n",TestNumber);
printf(" invalid Test Numer < sizeof