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

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

有如下程序,运行时输出的结果是 ______。 Option Base 1 Private Sub Command1_Click() Dim a(3,3) As Integer For m=1 To 3 For n=1 To 3 a(m-1,n-1)=m+n+1 Next n Next m For m=0 To 2 For n=0 To 2 Print a(n,m); Next n Print Next m End Sub

A.0 1 2 1 2 3 2 3 4

B.3 4 5 4 5 6 5 6 7

C.1 3 5 3 5 7 5 7 9

D.2 4 6 4 6 8 6 8 10


参考答案

更多 “ 有如下程序,运行时输出的结果是 ______。 Option Base 1 Private Sub Command1_Click() Dim a(3,3) As Integer For m=1 To 3 For n=1 To 3 a(m-1,n-1)=m+n+1 Next n Next m For m=0 To 2 For n=0 To 2 Print a(n,m); Next n Print Next m End SubA.0 1 2 1 2 3 2 3 4B.3 4 5 4 5 6 5 6 7C.1 3 5 3 5 7 5 7 9D.2 4 6 4 6 8 6 8 10 ” 相关考题
考题 ( 31 )有如下程序#include iostreamusing namespace std;Class Base{public:Base(int x=0):valB(x) {coutvalB;}~Base() {coutvalB;}private:int valB;};class Derived:public Base{public:Derived(int x=0,int y=0):Base(x),valD(y){coutvalD;}~Derived() {coutvalD; }private:int valD;};int main(){Derived obj12(2,3);retuen 0;}运行时的输出结果是A ) 2332B ) 2323C ) 3232D ) 3223

考题 有如下程序: include using namespace std; class BASE { public 有如下程序: #include<iostream> using namespace std; class BASE { public: ~BASE(){cout<<"BASE";} }; class DERIVED:public BASE { public: ~DERIVED(){cout<<"DERIVED";} }; int main(){DERIVEDx;retum 0;} 执行后的输出结果是A.BASEB.DERIVEDC.BASEDERIVEDD.DERIVEDBASE

考题 有如下程序:include using namespace std;class BASE{public:~BASE(){cout 有如下程序: #include <iostream> using namespace std; class BASE{ public: ~BASE(){cout<<"BASE";} }; class DERIVED:public BASE{ public: ~DERIVED(){cout<<"DERIVED";} }; int main(){DERIVED x;return 0;} 执行后的输出结果是A.BASEB.DERIVEDC.BASEDERIVEDD.DERIVEDBASE

考题 有如下程序:includeusing namespace std;class BASE{public:~BASE( ){cout 有如下程序: #include<iostream> using namespace std; class BASE{ public: ~BASE( ){cout<<"BASE";} }; class DERIVED:public BASE{ public: ~DERIVED( ){cout<<"DERIVED";} }; int main( ){DERIVED x;return 0;} 程序的输出结果是A.BASEB.DERIVEDC.BASEDERIVEDD.DERIVEDBASE

考题 有如下程序: #includeiostream usingnamespacestd; classBASE{ public: ~BASE(){cout"BASE";} }; classDERIVED:publicBASE{ public: ~DERIVED(){cout"DERIVED";} }; intmain(){DERIVEDx;return0;) 执行后的输出结果是( )。A.BASEB.DERlVEDC.BASEDERIVEDD.DERlVEDBASE

考题 有如下程序: include using namespace std; class Base{ int x; pu 有如下程序: #include<iostream> using namespace std; class Base{ int x; public: Base(int n=0):x(n){cout<<n;) int getX()const{return x;} }; class Derived:public Base{ int y; public: Derived(int m,int n):y(m,)Base(n){cout<<m;} Derived(int m):y(m){cout<<m;} }; int main(){ Derived d1(3),d2(5,7) return 0; }运行时的输出结果是A.375B.357C.375D.357

考题 有如下程序:include using namespace std;class BASE{public:~BASE() {cout 有如下程序: #include <iostream> using namespace std; class BASE{ public: ~BASE() {cout<<"BASE"; } }; class DERIVED: public BASE { public: ~DERIVED() {cout<;"DERIVED"; } }; int main(){DERIVED x; return 0;} 执行后的输出结果是______ 。A.BASEB.DERIVEDC.BASEDERIVEDD.DERIVEDBASE

考题 有如下程序: #includeiostroam using namespace std; class Base{ protected: Base{cout’A’;} Base(char C){coutc;} }; class Derived:public Base{ public: Derived(char C){toutC;} }; int main{ Derived dl(’B’); retum 0; } 执行这个程序的输出结果是( )。A.BB.BAC.ABD.BB

考题 有如下程序:#includeiostreamUsingnamespacestd;classBase{public:Base(intx=O):valB(x){coutvalB;)~Base( ){coutvalB;)Private:intvalB:};classDerived:publicBase{public:Derived(intX=0,inty=0):Base(x),valD(y)(coutvalD;)~Derived( ){coutvalD;)private:intvalD;};intmain( ){Derivedobj12(2,3);return0;}运行时的输出结果是( )。A.2332B.2323C.3232D.3223

考题 有如下程序:includeusing namespace std;class BASE{public:~BASE(){cout 有如下程序: #include<iostream> using namespace std; class BASE{ public: ~BASE(){cout<<"BASE";} }; class DERIVED:public BASE{ public: ~DERIVED(){cout<<"DERIVED";} }; int main(){DERIVED x;return 0;} 执行后的输出结果是( )。A.BASEB.DERIVEDC.BASEDERIVEDD.DERIVEDBASE