问题 填空题

下面程序由两个源程序文件:t4.h和t4.c组成,程序编译运行的结果是:【 】。t4.h的源程序为:#define N 10 #define f2(x) (X*N)t4.c的源程序为:#include#defineM 8#define f(x) ((x)*M)#include"t4.h" main(){int i,j;i=f(1+1);j=t2(1+1);printf("%d%d\n",i,J);}

答案

参考答案:16 11

解析:宏替换的运算规则,结合本题,我们可以得到f((1+1)*M)=fun((1+1)*8=16;f2(1+1)=l+1,l*n=1+1*10=11。

单项选择题 A3/A4型题
判断题