网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
有如下Sub过程:
Sub ind(a As Integer)
Static x As Integer
x= x + a
Print x:
End Sub
以下是调用它的事件过程,程序运行后,单击命令按纽Command1三次,输出结果为【 】。
Private Sub Command1_Click()
Ind 2
End Sub
参考答案
更多 “ 有如下Sub过程:Sub ind(a As Integer)Static x As Integerx= x + aPrint x:End Sub以下是调用它的事件过程,程序运行后,单击命令按纽Command1三次,输出结果为【 】。Private Sub Command1_Click()Ind 2End Sub ” 相关考题
考题
执行下列程序后,鼠标单击窗体,输出结果为 。Private Sub Form_Click()Print "Click";End SubPrivate Sub Form_MouseDown(Button As Integer, Shift _As Integer, X As Single, Y As Single)Print "Donw"End SubPrivate Sub Form_MouseUp(Button As Integer, Shift _As Integer, X As Single, Y As Single)Print " Up"End Sub( )。A.DownUpClickB.ClickDownUpC.DownClickUpD.UpDownClick
考题
设有如下通用过程: Public Function f(x As Integer) Dim y As Integer x=20 y=2 f=x*y End Function 在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程: Private Sub Command1_Click() Static x As Integer x=10 y=5 y=f(x) Print x; y End Sub 程序运行后,如果单击命令按钮,则在窗体上显示的内容是______。A.10 5B.20 5C.20 40D.10 40
考题
在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程: Private Sub subl(ByVal x As Integer, ByVal y As Integer, ByVal z As Integer) z=x*x+y*y End Sub Private Sub Command1_Click() Dim a As Integer a=8 Call subl(1, 2,a) Print a End Sub 程序运行后,单击命令按钮,则窗体下显示的内容是______。A.8B.2C.5D.11
考题
对窗体编写如下事件过程: Private Sub Form_ MouseDown(Button As Integer,Shift As Integer,X As Single,Y As Single) If Button =2 Then Print “AAAAA” End If End Sub Private Sub Form_ MouseUp (Button As Integer,Shift As Integer,X As Single,Y As Single) Print “BBBBB” End Sub 程序运行后,如果单击鼠标右键,则输出结果为______ 。A.AAAAA BBBBBB.BBBBBC.AAAAAD.BBBBB AAAAA
考题
要求当鼠标在图片框P1中移动时,立即在图片框中显示鼠标的位置坐标。下面能正确实现上述功能的事件过程是A.Private Sub P1_MouseMove(Button As Integer,Shift As Integer,x As Single,Y As Single) Print X,Y End SubB.Private Sub P1_M0useDown(Button As Integer,Shift As Integer,X As Single,Y As Single) Picture.Print X,Y End SubC.Private Sub P1_MouscMove(Button As integer,Shift As Integer,X As Single,Y As Single) P1.Print X.Y End SubD.Private Sub Form_MouseMove(Button As Integer,Shift As Integer,x As Single,Y As Single) P1.Print X.Y End Sub
考题
Command1_Click()事件代码如下: Private Sub Command1_Click() Dim x As Integer, Y As Integer x = 6 : Y : 8 Call ABC(X, Y) Print X; Y End Sub Private Sub ABC(ByVal X As Integer,Y As Integer) X = X + 4 Y = Y = 2 End Sub 事件发生后,X和Y的值分别为 ______。A.6, 8B.10, 10C.10, 8D.6, 10
考题
单击按钮时,以下程序运行后的输出结果是 Private Sub proc1(x As Integer,y As Integer,z As Integer) x=3*z y=2*z z=x+y End Sub Private Sub Command1_Click() Dim x As Integer,y As Integer,Z As Integer x=1:y=2:z=3 Call proc1(x,x,z) Print x;x;z Call proc1(x,y,y) Print x;y;y End SubA.6 6 12 `B.9 5 10 6101051010C.9 6 12D.9 10 10 910155410
考题
有如下程序: Private Sub Commandl_Click( ) Dim i As Integer For i=1 To 2 DS Next i End Sub Sub DS( ) 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 * #B.1 1 * #C.1 1 * # 1 1 * # 1 2 * #D.1 1 * # 1 1 * ## 1 2 * ##
考题
有如下一个Sub过程: Sub mlt(ParamArray numbers()) n=1 For Each x In numbers n=n*x Next x Print n End Sub 在一个事件过程中如下调用该Sub过程: Private Sub Command1_Click() Dim a As Integer Dim b As Integer Dim c As Integer Dim d As Integer a=1 b=2 c=3 d=4 mlt a,b,c,d End Sub 该程序的运行结果为( )。A.12B.24C.36D.48
考题
在窗体上画一个命令按钮,然后编写下列程序: Private Sub Command12_Click() Tt 3 End Sub Sub Tt(a As Integer) Static X As Integer X=X * a + 1 Print x; End Sub 连续三次单击命令按钮,输出的结果是A.1 5 8B.1 4 13C.3 7 4D.2 4 8
考题
执行下列程序后,鼠标单击窗体,输出结果为Private Sub Form_Click()Print "Click";End SubPrivate Sub Form_MouseDown(Button As Integer,Shift As Integer,X As Single,Y As Single)Print "Donw"End SubPrivate Sub Form_MouseUp(ButtonAs Integer,Shift As Integer,X As Single,Y As Single)Print "Up"End SubA.DownUpClickB.ClickDownUpC.DownClickUpD.UpDownCliek
考题
标准模块中有如下程序代码: Public x As Integer,y As Integer Sub var pub( ) x=10:y=20 End Sub 在窗体上有1个命令按钮,并有如事件过程: Private Sub Command1 Click( ) Dim x As Integer Call var pub x=x+100 y=y+100 Print x;y End Sub 运行程序后单击命令按钮,窗体上显示的是( )。A.100 100B.100 120C.110 100D.110 120
考题
有如下事件过程: 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 * ##
考题
在窗体上画一个名称为Command1的命令按钮,并编写如下过程: Private Sub Command1_Click() Dim x AS Integer Static y As Integer x=10 y=5 Call f1(x, y) Print x,y End Sub Private Sub f1(ByRef x1 As Integer, y1 As Integer) x1=x1+2 y1=y1+2 End Sub 程序运行后,单击命令按钮,在窗体上显示的内容是______。A.10 5B.12 5C.10 7D.12 7
考题
在窗体上画一个命令按钮,然后编写下列程序 Private Sub Command3_Click( ) Tcl 2 Tcl 3 Tel 4 End Sub Sub Tcl(a As Integer) Static x As Integer x=x + a Print x; End Sub 程序运行后,单击命令按钮,输出结果为A.2 3 4B.2 5 9C.3 5 4D.2 4 3
考题
对窗体编写如下事件过程: Private Sub Form_ Mouse Down(Button As Integer,Shift As Integer,X AS Single,Y As Single) If Button=2 Then Print "AAAAA" End if End Sub Private Sub Form. _ MouseUp(Button As Integer,Shift As Integer,X As Single,Y As Single) Print "BBBBB" End Sub 程序运行后,如果单击鼠标右键,则输出结果为 ______。A.AAAAA BBBBBB.BBBBB AAAAAC.AAAAAD.BBBBB
考题
在窗体上画一个命令按钮,然后编写如下程序: Private Sub Comrnand3_Click( ) Cop 2 Cop 3 Cop 4 End Sub Sub Cop (a As Integer) Static x As Integer x=x + a Print x; End Sub 程序运行后,单击命令按钮,输出结果为A.2 3 4B.2 5 9C.3 5 4D.2 4 3
考题
有如下自定义过程: Sub test(x As Integer) x =X *2+1 If x<6 Then Call test(x) End If x=x* 2 + 1 Print x; End Sub调用该过程的事件过程如下:Private Sub Command1_Click() test 2End Sub则该段程序的执行结果是______ 。A.12B.23 47C.23D.5 10
考题
有如下函数:Private Function firstfunc(x As Integer, y As Integer) As Integer Dim n As Integer Do While n <= 4 x=x +y n=-+1 Loop firstfunc = x End Function调用该函数的事件过程如下:Private Sub Command1_lick() Dim x As Integer Dim y As Integer Dim n As Integer Dim z As Integer x=1 y=1 For n = 1 To 3 z = firstfunc(x, y) Next n Print z End Sub该事件过程的执行结果是 ______。A.1B.3C.16D.9
考题
编写如下事件过程: Option Base 1 Private Sub Form Click() Dim x1()As Integer Dim i As Integer Dim s As Integer ReDim x1(3) For i = 1 To UBound(x1) x1(i)=i + 1 Next i Call sub1(x1) For i = 1 To UBound(x1) s = s + x1(i) Next i Print s End Sub Private Sub sub1(n()As Integer) Dim i As Integer ReDim Preserve n(5) For i = 3 To 5 n(i)=n(i-1)*2 Next i End Sub 程序运行后,单击窗体,则窗体上显示的内容是A.6B.12C.24D.47
考题
在窗体上画一个命令按钮,其名称为Commandl,然后编写如下程序: Pfivate Sub Commandl_Click() Dima(10) As Integer Dimx As Integer Fori=1 To 10 a(i)=8+i NeXt X=2 Print a(f(x)+x) End Sub Function f(X As Integer) X=X+3 f=X End FuA.12B.15C.17D.18
考题
执行下列程序后,鼠标单击窗体,输出结果为Private Sub Form_Click()Print "Click";End SubPrivate Sub Form_mouseDown(Button As Integer,ShiftAs Integer, X As Single, Y As Single)Print "Donw"End SubPrivate Sub Form_MouseUp(ButtonAsInteger,ShiftAs Integer, X As Single, Y As Single)Print "Up"End SubA.DownUpClickB.ClickDownUpC.DownClickUpD.UpDownClick
考题
执行下列程序后,鼠标单击窗体,输出结果为 Private Sub Form_Click() Print"Click": End Sub Private Sub Form_MouseDown(Button As Integer,Shift_As Integer,X As Single,Y As Single) Print"Donw" End Sub Private Sub Form_MouseUp(Button As Integer,Shift_As Integer,X As Single,Y As Single) Print"Up" End SubA.DownUpClickB.CfickDownUpC.DownClickUpD.UpDownClick
考题
在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程: Private Sub sub1(ByVal x As Integer, ByVal y As Integer, ByVal z As Integer) z=x * x+ y * y End Sub Private Sub Command1_Click() Dim a As Integer a = 8 Call sub1(1, 2,A)Print a End Sub 程序运行后,单击命令按钮,则窗体上显示的内容是A.8B.2C.5D.11
考题
设有一个命令按钮Command1的事件过程以及一个函数过程。程序如下: Private Sub Command1 Click( ) Static x A S Integer x=f(x+5) Cls Print X End Sub Private Function f(x As Integer)As Integer f=x+x End Function 连续单击命令按钮3次,第3次单击命令按钮后,窗体显示的计算结果是( )。A.10B.30C.60D.70
考题
在窗体上画一个名称为Command1的命令按钮,并编写如下程序: Private Sub Command1_Click( ) Dim x As integer Static y As integer x=10 y=5 Call f1(x,y) Print x,y End Sub Private Sub f1(ByRef xl As Integer,y1 As Integer) x1=x1+2 y1=y1+2 End Sub 程序运行后,单击命令按钮,在窗体上显示的内容是A.10 5B.12 5C.10 7D.12 7
考题
在窗体上画一个名称为Commandl的命令按钮,然后编写如下事件过程: Private Sub Command1_Click() Dim x As Integer,y As Integer x = 41: y = 54 Call sub1(x,y) x = x + 1 Print x; y End Sub Private Sub sub1(n As Integer, ByVal m As Integer) n=n Mod 10 m=m\10 End Sub 程序运行后,单击命令按钮,则窗体上显示的内容是A.41 54B.2 54C.1 3D.42 3
热门标签
最新试卷