const限定符是左结合的,即它修饰在它左边的类型
在说明const变量时,必须对该变量进行初始化
与宏定义符号常量的区别是,const将产生一个具有类型的符号
const变量是常量变量,所以一个const变量可以被多次赋予不同的常量
第1题:
A.const M=10;
B.const int M=20;
C.const char ch;
D.const bool mark=true;
第2题:
下列语句中错误的是( )。
A.const int a;
B.const int a=10;
C.const int*point=0;
D.const int*point=new int(10);
第3题:
下列符号常量的声明中,不合法的是
A.Const a As Single=1.1
B.Const a=”0K”
C.Const a As Double=Sin(1)
D.Const a As Integer=“12”
第4题:
下列语句中,错误的是( )。
A.const int buffer:256;
B.const int temp;
C.const double*point;
D.const double*rt=new double(5.5);
第5题:
在VB中,以下关于符号常量的声明正确的是 ( )
A.Const TAG as String
B.Const TAG as String="Visual Basic"
C.Public TAG as String="Visual"
D.Dim TAG as String
第6题:
( 18 ) 下列语句中,错误的是
A ) const int buffer=256;
B ) const double *point;
C ) int const buffer=256;
D ) double * const point;
第7题:
关于const修饰符的说法中,错误的是
A.const既可以修饰成员函数,也可以修饰数据成员,还可以修饰对象
B.若const修饰了一个对象,则该对象中的所有数据成员都无法被更新
C.常对象无法调用一般成员函数
D.常成员函数只能被常对象调用,不能被一般对象调用
第8题:
下列语句中,错误的是______。
A.const int buffer=256;
B.const double*point;
C.int const buffer=256;
D.double*const point;
第9题:
下列的符号常量定义中,错误的定义是( )。
A、const M=10;
B、const int M=20;
C、const char ch;
D、const bool mark=true;
第10题:
下列修饰符中,属于非访问限定符的是( )。
A.private
B.public
C.default
D.syncronized