#define f(x) x*x #include<stdio.h> main (){ int a = 6, b = 2, c; c = f(a) / f(b); printf("%d", c); }
3
18
36
9
宏是原样替代,f(a)/f(b)=a*a/b*b=6*6/2*2=36
遇见定义宏直接带入, 然后按照运算符优先级进行运算
这道题你会答吗?花几分钟告诉大家答案吧!
扫描二维码,关注牛客网
下载牛客APP,随时随地刷题