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

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

有如下事件过程: Private Sub Commaild1_Click( ) Dim i As Integer For i =1 To 2 DC Next i End Sub Sub DC( ) Dim x As Integer,m As String Static y,n x=x + 1 y=y + 1 m=m&"*":n=n &"#" Print x,y,m,n End Sub 程序运行后,输出的结果是

A.1 1 * # 1 1 * #

B.1 1 * # 1 2 * #

C.1 1 * # 1 1 * ##

D.1 1 * # 1 2 * ##


参考答案

更多 “ 有如下事件过程: Private Sub Commaild1_Click( ) Dim i As Integer For i =1 To 2 DC Next i End Sub Sub DC( ) Dim x As Integer,m As String Static y,n x=x + 1 y=y + 1 m=m"*":n=n "#" Print x,y,m,n End Sub 程序运行后,输出的结果是A.1 1 * # 1 1 * #B.1 1 * # 1 2 * #C.1 1 * # 1 1 * ##D.1 1 * # 1 2 * ## ” 相关考题
考题 在窗体上添加一个命令按钮,然后编写如下事件过程: Phvate Sub Commanl_Click() Dima(10)As Integer Dimp(3)As InteSer k=5 Fori=1 To 10 a(i)=i Nexti Fori=1 To 3 p(i)=a(i*i) Nexti Fori=1 To 3 k=k+p(i)*2 Nexti Printk End Sub 该程A.35B.33C.31D.29

考题 若有如下程序:includeusing namespace std;Class TestClass1{private:int a;public:T 若有如下程序: #include<iostream> using namespace std; Class TestClass1 { private: int a; public: TestClassl(int i) { a=i; } void disp() { cout<<a<<“,”; } }; Class TestClass2 { private: int b; publicA.10,10,10B.10,12,14C.8,10,12D.8,12,10

考题 在窗体画一个命令按钮,然后编写如下事件过程:Private Sub Command1_CIick()Dim a(1 To 10)Dim p(1 To 3)k=5For i =1 To 10a(i)=iNext iFor i=1 To 3p(i)=a(i*i)Next iFor i=1 To 3k=k+p(i)*2Next iPrint kEnd Sub程序运行后,单击命令按钮,输出结果是【 】。

考题 设有如下通用过程:Pubfic Function Fun(xStr As String)As StringDim tStr As String,strL As Integertstr=“”strL=Len(xStr)i=1Do While i=strL/2tStr=tStr&Mid(xStr,i,1)&Mid(xStr,strL-i+1,1)i=i+1LoopFun=tStrEndFunction在窗体上画一个名称为Commandl的命令按钮。然后编写如下的事件过程:Private Sub Commandl_Click()Dim S1 As StringS1=“abcdef”Print UCase(Fun(S1))End Sub程序运行后,单击命令按钮,输出结果是A.ABCDEFB.abedefC.AFBECDD.DEFABC

考题 有如下事件过程:Private Sub Form. Active ( )Dim Score (1 to 3) As IntegerDim i As IntegerDim t As VariantFori=3 To 1 step-1Score (i) = 2 * iNextFor Each t In ScorePrint tNextEnd Sub程序运行后窗体上显示的值为【 】。

考题 有如下程序;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 sample{private: int x, y;public: s 有如下程序: #include <iostream> using namespace std; class sample { private: int x, y; public: sample(int i,int j) { x=i; y=j; } void disp() { cout<<"displ"<<end1; } void disp() const { cout<<"disp2"<<end1; } }; int main () { const sample a(i,2); a.disp (); return 0; } 该程序运行后的输出结果是( )。A.disp1B.disp2C.disp1 disp2D.程序编译时出错

考题 在窗体上添加如下命令按纽,然后编写如下事件过程: Private Sub Command1_Click() Dim a(10)As Integer Dim p(3)As Integer k= 5 For i = 1 To 10 a(i) = i Next i For i = 1 To 3 p(i) = a(i * i) Next i For i = 1 To 3 k = k + p(i) * 2 Next i Print k End Sub该过程的运行结果为______。A.35B.33C.31D.29

考题 设有如下程序public class test {public static void main(String args[]) {Integer intObj=Integer.valueOf(args[args.length-1]);int i = intObj.intValue();if(args.length >1、System.out.println(i);if(args.length >0)System.out.println(i -1、;elseSystem.out.println(i - 2、;}}运行程序,输入如下命令:java test 2则输出为:A. testB. test -1C. 0D. 1E. 2

考题 在窗体上画一个命令按钮,然后编写如下事件过程:Private Sub Commandl_Click()Dim a (1 To 10)Dim p(1 To 3)k=5For i=1 To 10a(i)=iNextiFori=1 To 3p(i)=a(i*i)Next iFor i=1 To 3k=k+p(i)*2Next iPrint kEnd Sub程序运行后,单击命令按钮,输出结果是【 】。