#define PI 3.14
##define eps 0.001
#DEFINE TRUE
#define int INT
第1题:
下列程序的输出结果是( )。
#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.12
B.13
C.14
D.16
第2题:
程序中头文件type1.h的内容是( )。 #define N 5 #define M1 N*3 程序如下: #define "type1.h" #define M2 N*2 main() { int i; i=M1+M2; printf("%d\n",i); } 程序编译后运行的输出结果是( )。
A.10
B.20
C.25
D.30
第3题:
执行以下程序的输出结果是( )。
include<stdio.h>
define M 5
define N M+M
main()
{ int k;
k=N*N*5;printf(”%d\n" ,k);
}
第4题:
下面程序的输出是( )。#define N 3#define M(n) ((N+1)*n)#include <iostrearn.h>void main(){ int z=2*(N+M(5+1)); cout<<z<<end1;}
A.42
B.48
C.54
D.编译报错
第5题:
下面程序的输出结果是( )。 #define PI 3.1415 #define ARE(X) PI*x*x main() { int r=2; printf("%.2f",ARE(r+1)); }
A.28.26
B.28.26
C.9.28
D.9.28
第6题:
下面宏定义正确的是( )
A.#define S a*b
B.#define PI 3.14;
C.#define max(a,b) ((a) >(b) ?(a) ;(b) )
D.#define s(x) (x)*(x);
第7题:
下列定义中,不正确的有______。
A.#define PI 3.141592
B.#define S 345;
C.int max(x,y);
D.static char c; int x,y; { ...... }
第8题:
以下选项中的编译预处理命令行,正确的是( )。
A.deftne E 2.38
B.define PI_21.56
C.define int INT
D.DEFINE TRUE
第9题:
程序中头文件typel.h的内容是 #define N 5 #define M1 N*3 #define "typel .h" #define M2 N*2 main ( ) { int i; i=M1+M2; printf ("%d\n", i ); } 程序编译后运行的输出结果是
A.10
B.20
C.25
D.30
第10题:
( 25 )下列选项中,能正确定义数组的语句是
A ) int num[0..2008] ;
B ) int num[] ;
C ) int N=2008 ;
int num[N] ;
D ) #define N 2008
int num[N] ;
第11题:
若要求定义具有10个int形元素的一维数组a,则以下的定义语句中错误的是()
第12题:
#define PAI 3.14
#Define Eps 0.00001
##DEFINE FALSE 0
#define int INT
第13题:
以下能正确定义一维数组的选项是 ______。
A.int num[];
B.#define N 100 int num[N];
C.int num[0..100];
D.int N=100; int num[N];
第14题:
以下程序的输出结果是______。 #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.11
B.12
C.13
D.15
第15题:
有如下程序 #include<iostream.h> #define N2 #define M N+1 #define NUM 2*M+1 void main( ) { int i; for(i=1,i<= NUM;i++) cout<<i;} 该程序中的for循环执行的次数是
A.5
B.6
C.7
D.8
第16题:
以下程序的输出结果是______。 #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.11
B.12
C.13
D.15
第17题:
以下程序的输出结果是______。#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.11
B.12
C.13
D.15
第18题:
下列中 a的值是_________
#define AAA 200
#define BBB AAA+100
int a= BBB*2
第19题:
下面程序的输出结果是( ) #define PI 3.1415 #define ARE(x) PI*x*x main () {int r=2; printf("%f",ARE(r+1)); }
A.28.26
B.28.26
C.9.28
D.9.28
第20题:
下列定义不正确的有______。
A.#define PI 3.141592
B.#define S 345;
C.int max(x, y); int x,y; {}
D.int max(int,int);
第21题:
有以下程序: #include <iostream> using namespace std; #define PI 3.14 class Point { private: int x,y; public: Point(int a,int b) { x=a; y=b; } int getx() { return x; }
A.314
B.157
C.78.5
D.153.86
第22题:
下列定义不正确的是().
第23题:
12
13
15
11
第24题:
#define PI 3.14
##define eps 0.001
#DEFINE TRUE
#define int INT