#define PI 3.14 是()A.有语法错误B.语句C.编译预处理指令D.函数
#define PI 3.14 是()
A.有语法错误
B.语句
C.编译预处理指令
D.函数
参考答案和解析
错误
相关考题:
以下程序的执行结果是【】。 include define PI____3.14159 const int R=10; void main() 以下程序的执行结果是【 】。include<iostream>define PI____3.14159const int R=10;void main(){double a,b;ac2*R*PI;b=R*R*PI;cout<<"a="<<a<<","<<"b="<<b<<endl;"}
有以下程序:includeusingnamespacestd;definePI3.14classPoint{private: intx,y;pub 有以下程序: #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; } int gety() { return y; } }; class Circle : public Point { private: int r; public: Circle(int a,int b,int c):Point(a,b) { r=c; } int getr() { return r; } double area() { return PI*r*r; } }; int main() { Circle c1(5,7,10); cout<<cl.area()<<endl; return 0; } 程序执行后的输出结果是A.314B.157C.78.5D.153.86
下面程序的输出结果是( )。 #define PI 3.1415 #define ARE(X) PI*x*x main() { int r=2; printf("%.2f",ARE(r+1)); }A.28.26B.28.26C.9.28D.9.28
下面宏定义正确的是( )A.#define S a*bB.#define PI 3.14;C.#define max(a,b) ((a) >(b) ?(a) ;(b) )D.#define s(x) (x)*(x);
下列定义中,不正确的有______。A.#define PI 3.141592B.#define S 345;C.int max(x,y);D.static char c; int x,y; { ...... }
下面程序的输出结果是( ) #define PI 3.1415 #define ARE(x) PI*x*x main () {int r=2; printf("%f",ARE(r+1)); }A.28.26B.28.26C.9.28D.9.28
程序运行结果为______。#define R 3.0#define PI 3.1415926#define L 2*PI*R#define S PI*R*Rmain(){ printf("L=%f S=%f\n",L,S);}A.L=18.849556 S=28.274333B.18.849556=18.849556 28.274333=28.274333C.L=18.849556 28.274333=28.274333D.18.849556=18.849556 S=28.274333
若有以下程序:include using namespace std;define PI 3.14class Point{private: in 若有以下程序: #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; } int gety() { return y; } }; class Circle : public Point { private: int r; public: Circle(int a, int b,int c) :Point(a,b) { r=c; } int getr() { return r; } double area() { return PI*r*r; } }; int main() { Circle c1(5,7,10); cout<<c1.area()<<end1; return 0; } 程序执行后的输出结果是( )。A.314B.157C.78.5D.153.86
有以下程序:include using namespace std;define PI 3.14class Point{ private:int 有以下程序: #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.314B.157C.78.5D.153.86
A(73)is a value that never changes, for example: the value of Pi(approximately 3.14).A.variableB.stringC.BooleanD.constant
当执行下列宏定义命令后,S的值为 ( ) # defineR3.0 # define PI 3.1415926 # define L2 * PI * R # define S PI * R * RA.3.1415926B.18.849556C.3D.28.2743334
设实型变量pi已赋值为3.14159,下面不能输出3.14的语句是()A、write(pi:0:2)B、writeln(pi:1:2)C、write(pi:2:2)D、writeln(pi:2)
在VB语言中,下列常量说明语句正确的是()。A、Const PI As Single=3.14B、Dim a As Integer=15C、Const PI=3.14 As singleD、Dim a=15 As Integer
Float pi = new Float(3.14f); if(pi3) { System.out.print(”pi is bigger than 3. “); } else { System.out.print(”pi is not bigger than 3. “); } finally { System.out.println(”Have a nice day.”); } What is the result?() A、 Compilation fails.B、 pi is bigger than 3.C、 An exception occurs at runtime.D、 pi is bigger than 3. Have a nice day.E、 pi is not bigger than 3. Have a nice day.
对于在代码中经常要用到的且不会改变的值,可以将其声明为常量。如圆周率PI始终为3.14。现在要声明一个名为PI的圆周率常量,下面哪段代码是正确的()。A、const float PI;PI=3.14f;B、const float PI=3.14f;C、float const PI;PI=3.14f;D、float const PI=3.14f;
单选题下面关于编译预处理的命令行,正确的是( )。A#define PAI 3.14B#Define Eps 0.00001C##DEFINE FALSE 0D#define int INT
单选题代码isNaN("3.14")表示()。A是否是PI值B是否为空C是否是一个对象D是否是一个非数字