以下程序段中存在错误的是( ) 。
A.
B. define array_size 100int array1[array_size];
C. B.
D. define PI 3.14159
E. define S(r) PI*(r)*(r)„area=S(3.2);
F. C.
G. define PI 3.14159
H. define S(r) PI*(r)*(r)„area=S(a+b);
I. D.
J. define PI 3.14159
K. define S(r) PI*(r)*(r)„area=S(a);
请读程序:#include #define MUL(x,y) (x)*ymain(){int a=3,b=4,c;c=MUL(a++,b++);printf(“%d\n”,c);}上面程序的输出结果是( )。
A. 12
B. 15
C. 20
D. 16
#define能作简单的替代,用宏替代计算多项式4*x*x+3*x+2之值的函数f,正确的宏定义是( )。
A.
B. define f(x) 4*x*x+3*x+2
C. B.
D. define f 4*x*x+3*x+2
E. C.
F. define f(a) (4*a*a+3*a+2)
G. D.
H. define (4*a*a+3*a+2) f(a)
对下面程序段:#define A 3#define B(a) ((A+1)*a)„x=3*(A+B(7));正确的判断是( )。
A. 程序错误,不许嵌套宏定义
B. x=93
C. x=21
D. 程序错误,宏定义不许有参数