网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

有以下程序:

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


参考答案

更多 “ 有以下程序:Option Base 1Dim arr() As IntegerPrivate Sub Form_Click()Dim i As Integer,j As IntegerReDim arr(3,2)For i=1 To 3For j=1 To 2arr (i,j)=i*2+jNext jNext iReDim Preserve arr(1,4)For j=3 To 4Arr(3,j)=j+9Next jPrint arr(3,2);arr(3,4)End Sub程序运行后,单击窗体,输出结果为( )。 A.8 13B.0 13C.7 12D.0 0 ” 相关考题
考题 下列类的定义中,有( )处语法错误。 class Base { public: Base(){} Base(int i) { data=i; } private: int data; }; class Derive : public Base { public: Derive() : Base(0) {} Derive (int x) { d=x; } void setvalue(int i) { data=i; } private: d; };A.1B.2C.3D.4

考题 下列类的定义中,有( )处语法错误。 class Base { public: Base(){} Base(int i) { data=i; } private: int data; }; class Derive: public Base { public: Derive(): Base(0){} Derive(int x) { d=x; } void setvalue(int i) { data=i; } private: d; }A.1B.2C.3D.4

考题 下面程序的打印结果是【】。 include using namespace std; class Base { public:Base(i 下面程序的打印结果是【 】。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;}

考题 有以下程序:include include using namespace std;class base{private: cha 有以下程序: #include <iostream> #include <string> using namespace std; class base { private: char baseName[10]; public: base ( ) { strcpy (baseName, "Base"); } virtual char *myName() {A.DerivedBaseB.BaseBaseC.DerivedDerivedD.BaseDerived

考题 在标准模块中用:Dim或Private关键字定义的变量是______变量,它们只能在程序的模块中使用。

考题 有以下程序:includeusing namespace std;class BASE{private: char c;public: BASE(c 有以下程序: #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; pA.XYB.YXC.XD.Y

考题 有以下程序include using namespace std:class Base{private:char c;public:Base(cha 有以下程序#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.xyB.yxC.xD.y

考题 有以下程序:inClUdeusingnamespacestd;ClassBase{public: Base(intx) {a=x; } voidsh 有以下程序: #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.1B.5C.2D.0

考题 有以下程序includeusing namespace std;class Base{private:char c;public:Base(char 有以下程序 #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.xyB.yxC.xD.y

考题 1、以下哪些是装饰音标记()A.trB.fpC.dim.D.“-”