网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)
单选题
有以下程序:#include #define F(x) 2.84+x#define PR(a) printf(%d,(int)(a))#define PRINT(a) PR(a);putchar('')main(){ PRINT(F(5)*2);}程序运行后的输出结果是(  )。
A

12

B

13

C

15

D

11


参考答案

参考解析
解析:
直接置换宏定义命令行中相应形参字符串,非形参字符保持不变。将PRINT(F(5)*2)用PR(F(5)*2); putchar('')替换,将PR(F(5)*2)用printf(“%d”, (int)(F(5)*2))替换,再将F(5)用2.84+5替换,最后替换结果为printf(“%d”, (int)(2.84+5*2)); putchar(''),运行结果为:12<回车>。答案选择A选项。
更多 “单选题有以下程序:#include #define F(x) 2.84+x#define PR(a) printf(%d,(int)(a))#define PRINT(a) PR(a);putchar('')main(){ PRINT(F(5)*2);}程序运行后的输出结果是(  )。A 12B 13C 15D 11” 相关考题
考题 有以下程序# include stdio.h# define N 5# define M N+1# define f(x) (x*M)main(){ int i1, i2;i1 = f(2) ;i2 = f(1+1) ;printf("%d %d\n", i1, i2);}程序的运行结果是A)12 12B)11 7C)11 11D)12 7

考题 有以下程序#include stdio.h#define PT 3.5 ;#define S(x) PT*x*x ;main(){ int a=1, b=2; printf("%4.1f\n",S(a+b));}程序运行后的输出结果是A)14.0B)31.5C)7.5D) 程序有错无输出结果

考题 有以下程序 include define N 5 define M N+1 有以下程序 #include <stdio.h> #define N 5 #define M N+1 #define f(x) (x*M) main() { int i1,i2; i1=f(2) i2=f(1+1); printf("%d %d\n",i1,i2); } 程序的运行结果是______。A.12 12B.11 7C.11 11D.12 7

考题 (36)有以下程序#include stdio.h#define PT 3.5;#define S(x) PT*x*x;main(){ int a=1, b=2; printf(“%4.1f\n”,S(a+b));}程序运行后输出的结果是A)14.0 B)31.5 C)7.5 D)程序有错无输出结果

考题 以下程序运行后,输出结果是define PT5.5define S(x)PT*x*xincludemain(){int a=1,b= 以下程序运行后,输出结果是 #define PT 5.5 #define S(x) PT*x*x #include<stdio.h> main() { int a=1,b=2; printf("%4.1f\n",s(a+b));}A.49.5B.9.5C.22D.45.0

考题 下列程序的输出结果是()。 include define F(x)2.84+x define w(y)printf("%d",(int) 下列程序的输出结果是( )。#include<stdio.h>#define F(x)2.84+x#define w(y)printf("%d",(int)(y))#define P(y)w(y)putchar('\n')main(){ int x=2;P(F(5) *x);}A.12B.13C.14D.16

考题 以下程序的输出结果是______。 include define FUDGE(y)2.84+y define PR(a) printf( 以下程序的输出结果是______。 #include<stdio.h> #define FUDGE(y) 2.84+y #define PR(a) printf("%d",(int)(a)) #define PRINT1(a) PR(a);putchar('\n') main() { int x=2; PRINT1(FUDGE(5)*x); }A.11B.12C.13D.15

考题 有以下程序 include define F(X,Y) (X)*(Y) main( ) { int a=3, b=4; prin 有以下程序#include <stdio.h>#define F(X,Y) (X)*(Y)main( ){ int a=3, b=4;printf("%d\n", F(a++, b++));}程序运行后的输出结果是A.12B.15C.16D.20

考题 有以下程序: include difine F(X, Y)(X)*(Y)main(){int a=3, b=4; print("% d\n", 有以下程序: # include<stdio. h> # difine F(X, Y) (X)*(Y) main() { int a=3, b=4; print("% d\n", F(a++, b++)); } 程序运行后的输出结果是______。A.12B.15C.16D.20

考题 以下程序的输出结果是_________。 #include<stdio.h #defineFUDGE(y) 2.84+y #define PR(A) printf("%d",(int)(A) ) #definePRINT1(A) PR(A) ;putchar('\n') main() { int x=2; PRINT1(FUDGE(5)*X); }A.11B.12C.13D.15

考题 下列程序的输出结果是()。includedefine F(x)2.84+xdefine w(y)printf("%d",(int)(y) 下列程序的输出结果是( )。 #include<stdio.h> #define F(x)2.84+x #define w(y)printf("%d",(int)(y)) #define P(y)w(y)putchar('\n') main() { int x=2; P(F(5)*x); }A.12B.13C.14D.16

考题 以下程序的输出结果是______。includedefine FUDGE(y)2.84+ydefine PR(A)printf("%d" 以下程序的输出结果是______。 #include<stdio.h> #define FUDGE(y) 2.84+y #define PR(A) printf("%d",(int)(a) ) #define PRINT1(A) PR(a) ;putchar('\n') main() { int x=2; PRINT1(FUDGE(5)*X); }A.11B.12C.13D.15

考题 以下程序的输出结果是______。 include define FUDGE(y)2.84+y define PR(a)printf(" 以下程序的输出结果是______。 #include<stdio.h> #define FUDGE(y) 2.84+y #define PR(a) printf("%d",(int)(a)) #define PRINT() PR(s) ;putchar('\n') main() { intx=2; PRINT1 (FUDGE(5)*x); }A.11B.12C.13D.15

考题 有以下程序includedefine F(X,Y)(X)*(Y)main(){int a=3,b=4;printf("%d\n",F(a++,b++ 有以下程序 #include<stdio.h> #define F(X,Y)(X)*(Y) main() { int a=3,b=4; printf("%d\n",F(a++,b++)); 程序运行后的输出结果是A.12B.15C.16D.20

考题 有以下程序:includedefine N 5define M N+1define f(x)(x*M)main(){int i1,i2;i1=f 有以下程序: #include<stdio.h> #define N 5 #define M N+1 #define f(x)(x*M) main() {int i1,i2; i1=f(2); i2=f(1+1); printf("%d%d",i1,i2); } 程序的运行结果是( )。A.12 12B.11 7C.11 11D.12 7

考题 有以下程序includedefine PT3.5;define S(x)PT*x*x;main(){inta=1,b2;printf("%4.1f 有以下程序 #include<stdio.h> #define PT3.5; #define S(x)PT*x*x; main() { inta=1,b2; printf("%4.1f\n",S(a+b); } 程序运行后的输出结果是______。A.14.0B.31.5C.7.5D.程序有错无输出结果

考题 以下程序的输出结果是______。include define FUDGE(y)2.84+ydefine PR(a) printf ( 以下程序的输出结果是______。#include <stdio. h>#define FUDGE(y) 2.84+y#define PR(a) printf ("%d",(int)(a))#define PRINT1(a) PR(a); putchar('\n')main(){ int x=2; PRINT1(FUDGE(5)*x);}A.11B.12C.13D.15

考题 有以下程序:includedefine X 5+6main(){int a=2,c;C=X*2:printf("%d",C);}程序运行后 有以下程序: #include<stdio.h> #define X 5+6 main() {int a=2,c; C=X*2: printf("%d",C); } 程序运行后的输出结果是( )。A.17B.22C.16D.11

考题 以下程序运行后,输出结果是______。 define P4.5 define S(x)P*x*x include main() { 以下程序运行后,输出结果是______。 #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.5B.112.5C.18D.24

考题 以下程序的输出结果是()。includedefine F(x)2.84+xdefine w(y)printf("%d",(int)(y) 以下程序的输出结果是( )。 #include<stdio.h> #define F(x)2.84+x #define w(y)printf("%d",(int)(y)) #define P(y)w(y) main() {int x=2; P(F(5)*x); }A.12B.13C.14D.16

考题 以下程序运行后,输出结果是() include define PT5.5 define S (x)PT* x * x 以下程序运行后,输出结果是 ( ) # include<stdio.h> # define PT5.5 # define S (x)PT* x * x main( ) { int a=1,b=2; printf("%4.1f\n",s(a+b)); }A.49.5B.9.5C.22D.45

考题 下列程序的输出结果是()。includedefineF(x)2.84+xdefine w(y) printf("%d",(int)(y) 下列程序的输出结果是( )。 #include<stdio.h> #defineF(x)2.84+x #define w(y) printf("%d",(int)(y)) #define P(y)w(y)putchar('\n') main() { int x=2; P(F(5)*x); }A.12B.13C.14D.16

考题 有以下程序:include define P 3void F(int x) {return(P* x* x); tmain( ){printf(" 有以下程序:#include <stdio.h>#define P 3void F(int x) { return(P* x* x); tmain( ){ printf(" % d \n" ,F(3 + 5) ); }程序运行后的输出结果是( )。A.192B.29C.25D.编译出错

考题 有以下程序: include define M 5 define f(x,y) x*y+M main( ) { int k; k=f(2,3)*f(2,3); printf("%d\n",k); } 程序的运行结果是( )。 A.22B.41C.100D.121

考题 以下程序的输出结果是______。includedefine FUDGE(y) 2.84+ydefine PR(a)printf("%d 以下程序的输出结果是______。 #include<stdio.h> #define FUDGE(y) 2.84+y #define PR(a) printf("%d\n",(int)(a)) #define PRINT1(a) PR(a);putchar('\n') main() { int x=2; PRINT1(FUDGE(5)*x); }A.11B.12C.13D.15

考题 下列程序的输出结果是______。includedefine FUDGE(y)2.84+ydefine PR(a)printf("%d" 下列程序的输出结果是______。#include<stdio.h>#define FUDGE(y) 2.84+y#define PR(a) printf("%d",(int)(a))#define PRINTl(a) PR(a);putchar('\n')main (){ int x=2; PRINT1(FUDGE(5)*x);}A.11B.12C.13D.15

考题 有以下程序:include define F(X,Y)(X)*(Y)main(){int a=3,b=4;printf("%d\n",F(a++,b 有以下程序: #include <stdio.h> #define F(X,Y)(X)*(Y) main() { int a=3,b=4; printf("%d\n",F(a++,b++)); } 程序运行后的输出结果是( )。A.12B.15C.16D.20