> 其他 >
#define add(x) x*x main(){int a=4,b=6,c=7,d=add(a+b)*c;printf("d=%d\n",d);}怎样分析?
人气:365 ℃ 时间:2020-05-29 16:46:09
解答
#define宏是直接替换,不会先给你计算的
add(a+b) = a+b*a+b
d = add(a+b)*c = a+b*a+b*c =4+4*6+6*7 = 4+24+42 = 70
都是直接替换,不要自己加一些没有的字符.
推荐
猜你喜欢
© 2026 79432.Com All Rights Reserved.
电脑版|手机版