无参宏和有参宏
#include <stdio.h>
#define N 5+4 //无参宏
#define s(a,b) a*b//有参宏
void main()
{
printf("%d\n",N*N+30);//不能自加括弧,5+4*5+4+30=5+20+4+30=59
printf("%d\n",s(2,3));
}
#include <stdio.h>
#define N 5+4 //无参宏
#define s(a,b) a*b//有参宏
void main()
{
printf("%d\n",N*N+30);//不能自加括弧,5+4*5+4+30=5+20+4+30=59
printf("%d\n",s(2,3));
}