#define add(x) x*x main(){int a=4,b=6,c=7,d=add(a+b)*c;printf("d=%d ",d);}怎样分析?

#define add(x) x*x main(){int a=4,b=6,c=7,d=add(a+b)*c;printf("d=%d ",d);}怎样分析?

题目
#define add(x) x*x main(){int a=4,b=6,c=7,d=add(a+b)*c;printf("d=%d ",d);}怎样分析?
答案
#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
都是直接替换,不要自己加一些没有的字符.
举一反三
我想写一篇关于奥巴马的演讲的文章,写哪一篇好呢?为什么好
奥巴马演讲不用看稿子.为什么中国领导演讲要看?
想找英语初三上学期的首字母填空练习……
英语翻译
1,人们染上烟瘾,最终因吸烟使自己丧命.
最新试题
热门考点

超级试练试题库

© 2017-2019 超级试练试题库,All Rights Reserved.