下列常量说明中,符合语法的是()。
第1题:
( 18 ) 下列语句中,错误的是
A ) const int buffer=256;
B ) const double *point;
C ) int const buffer=256;
D ) double * const point;
第2题:
( 28 )有如下程序:
#include<iostream>
using namespace std;
class MyClass{
public:
MyClass(int x):val(x) {}
void Print() const {cout<<"const:val="<<val<<'\t';}
void Print(){cout<<"val="<<val<<'t';}
private:
int val;
};
int main(){
const MyClass obj1(10);
MyClass obj2(20);
obj1.Print();
obj2.Print();
return 0;
}
程序的输出结果是
A ) val=10 const:val=20
B ) const:val=10 const:val=20
C ) const:val=10 val=20
D ) val=10 val=20
第3题:
在VB中,以下关于符号常量的声明正确的是 ( )
A.Const TAG as String
B.Const TAG as String="Visual Basic"
C.Public TAG as String="Visual"
D.Dim TAG as String
第4题:
A.
const Pi float64 = 3.14159265358979323846const zero = 0.0
B.
const (size int64 = 1024eof = -1 )
C.
const (ERR_ELEM_EXIST error = errors.New("element already exists")ERR_ELEM_NT_EXIST error = errors.New("element not exists"))
D.
const u, v float32 = 0, 3 const a, b, c = 3, 4, "foo"
第5题:
下列语句中,错误的是( )。
A.const int buffer:256;
B.const int temp;
C.const double*point;
D.const double*rt=new double(5.5);
第6题:
What do the following declarations mean?
a) const int a;
b) int const a;
c) const int *a;
d) int * const a;
e) int const * a const;
第7题:
第8题:
下列关于const限定符的说法中,错误的是()。
第9题:
在VB语言中,下列常量说明语句正确的是()。
第10题:
以下定义常量不正确的语句是()
第11题:
以下各项中,不是字符串常量的是()。
第12题:
const限定符是左结合的,即它修饰在它左边的类型
在说明const变量时,必须对该变量进行初始化
与宏定义符号常量的区别是,const将产生一个具有类型的符号
const变量是常量变量,所以一个const变量可以被多次赋予不同的常量
第13题:
下列语句中错误的是( )。
A.const int a;
B.const int a=10;
C.const int*point=0;
D.const int*point=new int(10);
第14题:
VB中定义常量的语法正确的( )
A.常量名[AS类型]
B.常量名[AS类型]=表达式
C.Const常量名[AS类型]
D.Const常量名[AS类型]=表达式
第15题:
下列的符号常量定义中,错误的定义是( )。
A、const M=10;
B、const int M=20;
C、const char ch;
D、const bool mark=true;
第16题:
A.const char *p=”ABCD”;
B.char const *p=”ABCD”;
C.char *const p=”ABCD”;
D.const char *const p=”ABCD”;
第17题:
下列符号常量的声明中,______ 是不合法的。
A.Const a As Single =1.1
B.Const d As Integer =“12”
C.Const b As Double = Sin(1)
D.Const c As String = “OK”
第18题:
下列符号常量的声明中,不合法的是
A.Const a As Single=1.1
B.Const a="OK"
C.Const a As Double=Sin(1)
D.Const a As Integer="12"
第19题:
关于const关键字说法错误的是()
第20题:
下列符号常量的声明中,()是不合法的。
第21题:
在下列的标识符常量的定义语句中,错误的定义语句是()。
第22题:
若有类W说明class W{int a;public:voidfConst(int&)const;};,则函数fConst的正确定义是()
第23题:
CONST color=red
CONST const=10*5
CONST xl:=3.9
CONST color=”abcd”