设有如下程序: Option Base 1 Private Sub Command1_Click( ) Dim a(10) As Integer Dim n As Integer n=InputBox(“输入数据”) If n10 Then Call GetArray(a,n) End If End Sub Private Sub GetArray(b( )As Integer,n As Integer) Dim c(10) As Integer j=0 For i=1 To n b(i)=CInt(Rnd( )*100) If b(i)/2=b(i)\2 Then j=j+1 c(j)=b(i) End If Next Print j End Sub以下叙述中错误的是A.数组b的偶数被保存在数组c中B.程序运行结束时,在窗体上显示的是c数组中元素的个数C.GetArray过程的参数n是按值传送的D.如果输入的数据大于10,则窗体上不显示任何信息
设有如下程序: Option Base 1 Private Sub Command1_Click( ) Dim a(10) As Integer Dim n As Integer n=InputBox(“输入数据”) If n<10 Then Call GetArray(a,n) End If End Sub Private Sub GetArray(b( )As Integer,n As Integer) Dim c(10) As Integer j=0 For i=1 To n b(i)=CInt(Rnd( )*100) If b(i)/2=b(i)\2 Then j=j+1 c(j)=b(i) End If Next Print j End Sub以下叙述中错误的是
A.数组b的偶数被保存在数组c中
B.程序运行结束时,在窗体上显示的是c数组中元素的个数
C.GetArray过程的参数n是按值传送的
D.如果输入的数据大于10,则窗体上不显示任何信息
相关考题:
有如下程序:includeusing namespace std;class Base{private:char c;piblic:Base(cha 有如下程序: #include<iostream> using namespace std; class Base { private: char c; piblic: 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
有如下程序:includeusing namespace std;class Base{public:Base(int x=0){cout 有如下程序: #include<iostream> using namespace std; class Base{ public: Base(int x=0){cout<<x;} }; class Derived:public Base{ public: Derived(int x=0){cout<<x;} private: Base val; }; int main( ){ Derived d(1); return 0; } 程序的输出结果是A.0B.1C.01D.001
有如下程序;include using namespace std;class Base{public;Base(inti){x=i;}void d 有如下程序; #include <iostream> using namespace std; class Base { public; Base(inti){x=i;} void dispa0{cout<<x<<',';} private; int x; }; class Derived;public Base { public; Derived(int i);Base(i+10) {x=i;) void dispb(){dispa();cout<<x<<end1;} private; int x; }; int main() { Derived b(2) ; b.dispb(); return 0; } 运行的结果是( )。A.2,2B.12,2C.12,10D.10,2
有以下程序: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
有以下程序: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
有如下程序:include using namespace std;class Base{private:charc;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
有如下程序: #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
有如下程序:include using namespace std;class Base{private:char c;public:Base(ch 有如下程序:#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
有以下程序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