问题
单项选择题
下面程序由两个源程序文件t4.h和t4.c组成,程序编译运行的结果是t4.h的源程序为:
#define N 10
#define f2(x)(x*N)
t4.c的源程序为:
#include <stdio.h>
#define M 8
#define f(x)((x)*M)
#include "t4.h"
main()
int i,j;
i=f(1+1);j=f2(1+1)
printf("%d%d\n" ,i,j);
A) 920
B) 1611
C) 911
D) 1610
答案
参考答案:B
解析: i=f(1+1)展开后为i=(1+1)*M=(1+1)*8=16。j=f2(1+1)展开后为j=1+1=1+1*10=11。