设有如下程序: Option Base 1 Private Sub Form. Click( ) Dim a(5)As String,i As Integer For i=1 To 5 a(i)=Chr(Asc("A")+i) Call f(a,i) Next i End Sub Sub f(ta( )As String,n As.Integer) Dim i As Integer For i=1 To n Print ta(i); Next i Print End Sub 对上述程序.以下叙述中正确的是( )。A.程序有错,因为在过程f的定义中数组参数格式不正确B.程序可正常运行,输出内容的第一行是一个字母“A”C.程序可正常运行,输出内容的第一行是一个字母“B”D.程序可正常运行,输出内容的第一行是数字65

设有如下程序: Option Base 1 Private Sub Form. Click( ) Dim a(5)As String,i As Integer For i=1 To 5 a(i)=Chr(Asc("A")+i) Call f(a,i) Next i End Sub Sub f(ta( )As String,n As.Integer) Dim i As Integer For i=1 To n Print ta(i); Next i Print End Sub 对上述程序.以下叙述中正确的是( )。

A.程序有错,因为在过程f的定义中数组参数格式不正确

B.程序可正常运行,输出内容的第一行是一个字母“A”

C.程序可正常运行,输出内容的第一行是一个字母“B”

D.程序可正常运行,输出内容的第一行是数字65


相关考题:

设有如下程序:Private Sub Form_Click()Dim ary(1 To 5)As IntegerDim i As IntegerDim sum As IntegerFor i=1 To 5ary(j)=i+1sum=sum+ary(i)Next 1Print sumEud Sub程序运行后,单击窗体,则在窗体上显示的是A.15B.16C.20D.25

有如下程序: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

设有如下程序:Private Sub Form. Click( )Dim ary(1 To 5)As IntegerDim i As IntegerDim sum As IntegerFor i=1 To 5ary(i)=i+lsum=sum+ary(i)Next iPrint sumEnd Sub程序运行后,单击窗体,则在窗体上显示的是( )。A.15B.16C.20D.25

有如下程序;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 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;}

在窗体上面一个名称为Commandl的命令按钮,然后编写如下程序: Option.Base 1 Private Sub Command1_Click() Dim a As Variant a=Array(1,2,3,4,5) Sum = 0 For i = 1 To 5 Sum=Sum+a(i) Next i x=Sum/5 For i=1 To 5 If a(i) >x Then Print a(i); Next i End Sub 程序运行后,单击命令按钮,在窗体上显示的内容是A.1 2B.1 2 3C.3 4 5D.4 5

有以下程序: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

有如下程序: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 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

有以下程序: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