以下程序运行后,输出结果是 #define PT 5.5 #define S(x)PT* x * x main() {int a=1,b=2; printf("%4.lf\n",S(a+b); }
A: 49.5
B: 9.5
C: 22.0
D: 45.0
A: 49.5
B: 9.5
C: 22.0
D: 45.0
B
举一反三
- 以下程序的输出结果是_____.#define PT 5.5#define S(x) PT*x*xvoid main(){ int a=1,b=2; printf("%.1f\n",S(a+b));} A: 12.0 B: 12.5 C: 9.5 D: 33.5
- 以下程序运行后,输出结果是______。 #define P4.5 #define S(x)P*x*x #include<stdio.h> main() { int a=2,b=3; printf("%.1f\n",S(a+b)); } A: 49.5 B: 112.5 C: 18.0 D: 24.0
- 【单选题】有以下程序: #include <stdio.h> #define PT 3.5 #define S(x) PT*x*x; void main() { inta=1,b=2;printf("%4.1f ",S(a+b));} 程序运行后的输出结果是() A. 7.5 B. 31.5 C. 程序有错无输出结果 D. 14.0
- 以下程序的输出结果是______。 #define TIMES(X) X*X main() int a=16,k=2,m=1; a/=TIMES (k+m)/TIMES(k+m); printf("d\n", A: ; B: &n
- 下列程序运行后的输出结果是:_____#includestdio.hvoid fun( int *pa, int pb ) { int pt; pt = *pa, *pa = pb, pb = pt;}int main( ){ int x=1, y=2; fun(x, y); printf(%d, x==y); return 0;}
内容
- 0
以下程序的输出结果是( )。#define f(x) x*x main() {int a=6,b=2,c; c=f(a)/f(b); printf(“%d”,c); }
- 1
【单选题】有以下程序 #include #define f(x) x*x*x main() { int a=3,s,t; s=f(a+1);t=f((a+1)); printf(“%d,%d ’,s,t); } 程序运行后的输出结果是 A. 10,64 B. 10,10 C. 64,10 D. 64,64
- 2
以上程序的输出结果是______。 #define MIN(x,y) (x)<(y)(x):(y) main() { int a=5,b=2,c=3,d=3,t: t=MIN(a+b,c+d)*10;printf("%d\n" t);}
- 3
以下程序的输出结果是________。 #include "stdio.h" #define f(x) x*x void main() { int a=6,b=2,c; c=f(a)/f(b); printf("%d",c); }
- 4
下列程序的运行结果为________。 #include "stdio.h" #define MA(x) x*(x-1) void main() { int a=1,b=2; printf("%d",MA(1+a+b)); }