• 2022-06-14 问题

    请从下列程序中选出存在错误的行代码( )。[br][/br] const double PI=3.1415926;——L1 const int MONTH_IN_YEAR=12;——L2 const double MY_VALUE=3*PI;——L3 int i=1; ——L4 const int CONST_I=i+10; ——L5 A: L1 B: L2 C: L3 D: L4 E: L5

    请从下列程序中选出存在错误的行代码( )。[br][/br] const double PI=3.1415926;——L1 const int MONTH_IN_YEAR=12;——L2 const double MY_VALUE=3*PI;——L3 int i=1; ——L4 const int CONST_I=i+10; ——L5 A: L1 B: L2 C: L3 D: L4 E: L5

  • 2022-11-04 问题

    定义q为一个指向int类型的变量i的常指针语句( )。 A: int * const q=i; B: int * const q=&i; C: const int *q=i; D: const int *q=&i;

    定义q为一个指向int类型的变量i的常指针语句( )。 A: int * const q=i; B: int * const q=&i; C: const int *q=i; D: const int *q=&i;

  • 2022-06-14 问题

    如有定义const int i=5; const int j=3; const int *p=&i; 则执行语句p=&j; 是合法的。

    如有定义const int i=5; const int j=3; const int *p=&i; 则执行语句p=&j; 是合法的。

  • 2022-06-14 问题

    解释下列5个定义的含义,指出其中哪些定义是非法的:(a)int i;(b)const int ic;(c)const int*pic;(d)int*const cpi;(e)const int*const cpic;

    解释下列5个定义的含义,指出其中哪些定义是非法的:(a)int i;(b)const int ic;(c)const int*pic;(d)int*const cpi;(e)const int*const cpic;

  • 2021-04-14 问题

    有如下程序: Const N=-5 Const M=6 Dim a(N To M)As Integer For i=LBound(a)To UBound(a) a(i)= i Next i Print a(LBound(a));a(UBound(a)) 运行后,输出结果为(  )。

    有如下程序: Const N=-5 Const M=6 Dim a(N To M)As Integer For i=LBound(a)To UBound(a) a(i)= i Next i Print a(LBound(a));a(UBound(a)) 运行后,输出结果为(  )。

  • 2022-06-14 问题

    分析下列程序,指出该程序中定义了几种常类型量。 #include class C { public: C(int i) { p=i; } int getp() { return p; } const int fun(int i)const { return p+i; } private: int p; }; void main() { C a(4); const int b=a.fun(6); int c=a.getp(); cout

    分析下列程序,指出该程序中定义了几种常类型量。 #include class C { public: C(int i) { p=i; } int getp() { return p; } const int fun(int i)const { return p+i; } private: int p; }; void main() { C a(4); const int b=a.fun(6); int c=a.getp(); cout

  • 2021-04-14 问题

    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;

    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;

  • 2021-04-14 问题

    【单选题】In the following description of a const member, the error is (). (2.0分) A. Const members are specified with the keyword const B. There are two types of const member: const data member and const member function C. The initialization of a const data member occurs when it is defined in the class body D. The value of a const data member cannot be changed

    【单选题】In the following description of a const member, the error is (). (2.0分) A. Const members are specified with the keyword const B. There are two types of const member: const data member and const member function C. The initialization of a const data member occurs when it is defined in the class body D. The value of a const data member cannot be changed

  • 2021-04-14 问题

    this指针既可以是指向const对象的非const指针,也可以是指向非const对象的const指针

    this指针既可以是指向const对象的非const指针,也可以是指向非const对象的const指针

  • 2022-06-16 问题

    下面几组代码正确的是 A: const int a; B: const int a; a=1; C: const int a=1; D: int const a=1;

    下面几组代码正确的是 A: const int a; B: const int a; a=1; C: const int a=1; D: int const a=1;

  • 1 2 3 4 5 6 7 8 9 10