有以下程序:
Option Base 1
Dim arr() As Integer
Private Sub Form_Click()
Dim i As Integer,j As Integer
ReDim arr(3,2)
For i=1 To 3
For j=1 To 2
arr (i,j)=i*2+j
Next j
Next i
ReDim Preserve arr(1,4)
For j=3 To 4
Arr(3,j)=j+9
Next j
Print arr(3,2);arr(3,4)
End Sub
程序运行后,单击窗体,输出结果为( )。 A.8 13
B.0 13
C.7 12
D.0 0
第1题:
在标准模块中用:Dim或Private关键字定义的变量是______变量,它们只能在程序的模块中使用。
第2题:
有以下程序#include <iostream>using namespace std:class Base{private: char c;public: Base(char n) :c(n) {} ~Base ( ) { cout<<c; }}; class Derived : public Base{private: char c;public: Derived(char n):Base (n+1),c(n) {} ~Derived() { cout<<c; }};int main(){ Derived obj('x'); return 0;} 执行后的输出结果是
A.xy
B.yx
C.x
D.y
第3题:
有以下程序 #include<iostream> using namespace std; class Base { private: char c; public: Base(char n):c(n){} ~Base() { cout<<c; } }; class Derived:public Base { private: char c; public: Derived(char n):Base(n+1),c(n){} ~Derived() { cout<<c; } }; int main() { Derived obj('x'); return 0; } 执行后的输出结果是
A.xy
B.yx
C.x
D.y
第4题:
有以下程序: #include <iostream> using namespace std; class BASE { private: char c; public: BASE(char n):c(n);{} virtual~BASE() { cout<<c; } }; class DERIVED:public BASE { char c; p
A.XY
B.YX
C.X
D.Y
第5题:
有以下程序: #inClUde <iostream> using namespace std; Class Base { public: Base(int x) { a=x; } void show() { cout<<a; } private: int a; }; class Derived : public Base { public: Derived(int i) :Base(i+1),b(i){} void Show() { cout<<b; } private: int b; }; int main() { Base b(5),*pb; Derived d(1); pb=&d; pb->show(); return 0; } 运行后的输出结果是( )。
A.1
B.5
C.2
D.0
第6题:
1、以下哪些是装饰音标记()
A.tr
B.fp
C.dim.
D.“-”