< DOCTYPE HTML PUBLIC -WCDTD HTML TransitionalEN> #include "stdio.h" #define f(x) x*x int main(void) { int i; i=f(4+4)/4; printf("%d",i); return 0; }
输出为21
#define为宏替换
i=4+4*4+4/(2+2)=21
< DOCTYPE HTML PUBLIC -WCDTD HTML TransitionalEN> #include "stdio.h" #define f(x) x*x int main(void) { int i; i=f(4+4)/4; printf("%d",i); return 0; }
输出为21
#define为宏替换
i=4+4*4+4/(2+2)=21