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

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

以下是某个窗体的模块代码,请分析单击窗体后程序运行至"*"号位置时变量X、Y和Z的值分别是【 】。

DIM X AS INTEGER

DIM Y AS INTEGER

PRIVATE SUB FORM_CLICK()

DIM X AS INTEGER

X=1

Y=1

CALL AA(Y+1)

Z=BB(X)

'* * * * * * *

MSGBOX "X="&X&"/Y="&Y&"/Z="&Z

END SUB

PRIVATE SUB AA(BYVAL Z AS INTEGER)

Y=Z+X

Z=X+Y

END SUB

PRIVATE FUNCTION BB(BYREF Y AS INTEGER

Y=Y+1

BB=X+Y

END FUNCTION


参考答案

更多 “ 以下是某个窗体的模块代码,请分析单击窗体后程序运行至"*"号位置时变量X、Y和Z的值分别是【 】。DIM X AS INTEGERDIM Y AS INTEGERPRIVATE SUB FORM_CLICK()DIM X AS INTEGERX=1Y=1CALL AA(Y+1)Z=BB(X)'* * * * * * *MSGBOX "X="X"/Y="Y"/Z="ZEND SUBPRIVATE SUB AA(BYVAL Z AS INTEGER)Y=Z+XZ=X+YEND SUBPRIVATE FUNCTION BB(BYREF Y AS INTEGERY=Y+1BB=X+YEND FUNCTION ” 相关考题
考题 在窗体上画一个名称为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

考题 ( 28 ) 标准 模块中有如下程序代码:Public x As Integer,y As IntegerSub var_pub()x=10:y=20End Sub在窗体上有 1 个命令按钮,并有如下事件过程:Private Sub Command1_Click()Dim x As IntegerCall var_pubx=x+100y=y+100Print x;yEnd Sub运行程序后单击命令按钮,窗体上显示的是A ) 100 100B ) 100 120C ) 110 100D ) 110 120

考题 ( 8 )窗体上有名称为 Command1 的命令按钮。事件过程及 2 个函数过程如下:Private Sub Command1_Click()Dim x As Integer,y As Integer,zx=3y=5z=fy(y)print fx(fx(x)),yEnd SubFunction fx(ByBal a As Integer)a=a+afx=aEnd FunctionFunction fy(ByRef a As Integer)a=a+afy=aEnd Function运行程序,并单击命令按钮,则窗体上显示的 2 个值依次是 【 12 】 和 【 13 】 。

考题 标准模块中有如下程序代码:Public x As Integer,Y As IntegerSub vat_pub()x=10:Y=20End Sub在窗体上有1个命令按钮,并有如下事件过程:Private Sub Commandl—Click()Dim X As IntegerCall vat_pubx=x 4-looY=Y+100Print x;YEnd Sub运行程序后单击命令按钮,窗体上显示的是A.100 100B.100 120C.110 100D.110 120

考题 在窗体中添加一个命令按钮(名为Command1)和一个文本框(名为text1),编写如下事件过程:Private Sub Command1_Click()Dim x As Integer,y As Integer,z As IntegerCall f(x,y,z)End SubSub f(a As Integer,b As Integer,c As Integer)c=b*aEnd Sub打开窗体运行后,单击命令按钮,文本框中显示的内容是( )。

考题 下列说法中,不正确的说法是( )。 A、不能用Private定义模块级变量B、不能在“通用声明”段中为变量赋值C、不能在窗体的某个子程序中定义窗体级变量D、声明窗体级变量的位置是在窗体所有过程的最前面

考题 在窗体上画一个名称为Command1的命令按钮和3个名称分别为Label1, Label2, Label3的标签,然后编写如下代码: Private x As Integer Private Sub Command1_Click() Static y As Integer Dim z As Integer n= 10 z = n + z y = y + z x = x + z Label1.Caption = x LabelCaption = y LabelCaption = z End Sub 运行程序,连续三次单击命令按钮后,则3个标签中显示的内容分别是A.10 10 10B.30 30 30C.30 30 10D.10 30 30

考题 在窗体上画一个命令按钮,然后编写如下程序(假定变量x是—个窗体级变量)Dim x As IntegerSub inc(a AS Integer)X=K+aEnd SubPrivate Sub Command1_Click()inc2inc3inc4Prmt x;Ead Sub程序执行后,单击Command1命令按钮,输出的结果是【 】。

考题 单击一次窗体之后,下列程序代码的执行结果为______。 Private Sub Command1_ Click() Dim a As Integer, b As Integer, c As Integer a = 1: b = 2: c = 4 Print Value(a, b,C)End Sub Function Num(x As Integer, y As Integer, z As Integer) Num = x * x + y * y + z * z End Function Function Value(x As Integer, y As Integer, z As Integer) Value = Num(x, y, z) + 2 * x End FunctionA.21B.23C.19D.35

考题 标准模块中有如下程序代码: 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

考题 窗体上有名称为Commandl的命令按钮。事件过程及2个雨数过程如下:Private Sub Commandl_Click()Dim X As Integer,Y As Integer,zx=3Y=5z=fy(Y)Print fx(fx(x)),yEnd SubFunction fx(ByVal a As Integer)a=a+afx=aEnd FunctionFunction fy(ByRef a As Integer)a=a+afy=aEnd nlnction运行程序,并单击命令按钮,则窗体上显示的2个值依次是【 】和【 】。

考题 以下程序运行后,单击命令按钮,窗体显示的结果是 ______。 Private Function p1(x As Integer,y As Integel,z As Integer) p1=2*x+y+3*z End Function Private Function p2(x As Integer,y As Integer,z As Integer) p2=p1(2,y,x)+x End Function Private SubCommandl_Click() Dim a As Integer Dim b As Integer Dim c As Integer a=2:b=3:c=4 Print p2(c,b,A)End SubA.19B.21C.22D.23

考题 以下程序运行时,单击窗体后,在窗体上输出的结果是 ______。 Private SubForm_Click() Dim a As Integer,b As Integer a=10 :b=20 Call ff(a,B)Print a,b End Sub Private Sub ff(x As Integer,y As Integer) x=x+y y=x+y End SubA.30 50B.30 30C.20 20D.10 20

考题 有下列程序: Private Sub Command1_Click() X$="Nanchang" y$="Beijing" z$="Nanjing" z$=InStr(Left(x$,3)+Right(y$,4),z$) Print z$ End Sub 程序运行后,单击命令按钮,则窗体上显示的内容是A.0B.1C.3D.4

考题 在窗体上画一个命令按钮,然后编写如下代码。运行程序后,单击命令按钮,依次在输人对话框中输入2,7,5,3,8,5,12,6,12,在窗体上输出的结果是______。 Private Sub Command1 Click() z=5 Do Until z<>5 x=InputBox“请输入x值”) x=Val(x) y=InputBox(“请输入y值”) y=Val(y) z=InputBox(“请输入z值”) z=Val(z) y=x+y+2 * z Loop Print y End SubA.19B.21C.42D.19

考题 标准模块中有如下程序代码:Public x As Integer,y As IntegerSub var pub( )x=10:y=20End Sub在窗体上有1个命令按钮,并有如事件过程:Private Sub Command1 Click( )Dim x As IntegerCall var pubx=x+100y=y+100Print x;yEnd Sub运行程序后单击命令按钮,窗体上显示的是( )。A.100 100B.100 120C.110 100D.110 120

考题 在窗体上画一个名称为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

考题 运行下列程序:Private Sub Form_Click( )Dim x As Integer, y As String, z As Stringy = 12345For x = 1 To Len(y)z = Mid(Left(y, x), 1)Next xPrint zEnd Sub单击窗体后,则在窗体上显示的结果是( )。A.1B.11111C.55555D.12345

考题 运行下列程序:Dim x, yPrivate Sub Form_Click( )x = 1: y = 1: z = 1fun1 (1)Print x; y; zEnd SubPrivate Sub fun1(a)x = a + x: y = a + x: z = a + yEnd Sub单击窗体后,则输出结果是( )。A.1 1 1B.2 3 1C.2 3 4D.2 2 1

考题 运行下列程序:Private Sub Form_Click( )Dim y As Integer, x As IntegerDo Until x > 20x 运行下列程序:Private Sub Form_Click( )Dim y As Integer, x As IntegerDo Until x 20x = x + 10y = y + xIf x 20 Then Exit DoLoopPrint x, yEnd Sub单击窗体后,则在窗体上显示的结果是( )。A.10 20B.30 60C.10 30D.20 60

考题 运行下列程序:Dim bPrivate Sub Form_Click( )a = 1: b = 1Call fun1(a)Print "X = X = ; a; ,Y = ; bEnd SubPrivate Sub fun1(a)b = 2 * aa = 3 * bEnd Sub单击窗体后,则在窗体上显示的结果是( )。A.X = 1,Y = 1B.X = 2,Y = 6C.X = 6,Y = 2D.X = 6,Y = 1

考题 用以下方式声明的变量,()可以在整个程序中通用?A、在窗体模块用Dim进行声明B、在窗体模块用Public进行声明C、在窗体模块用Private进行声明D、在窗体模块用Static进行声明

考题 在窗体上添加一个命令按钮和三个标签,编写事件过程: Private x As Integer Private Sub Command1_Click( ) Static yAs Integer Dim z As Integer N=10: z=N+z: y=y+z: x=x+z Label1.Caption = xLabel2.Caption = y Label3.Caption = z End Sub 程序运行后,连续三次单击命令按钮,则三个标签中显示的内容分别是()。A、101010B、303030C、303010D、103030

考题 下列不能打开代码窗口的操作是()。A、双击窗体上的某个控件B、双击窗体C、单击查看代码按钮D、单击窗体或控件

考题 在窗体代码编辑窗口的通用声明区用Dim或Private定义的变量是()。A、模块级变量B、窗体级变量C、动态局部变量D、全局变量

考题 单选题在窗体代码编辑窗口的通用声明区用Dim或Private定义的变量是()。A 模块级变量B 窗体级变量C 动态局部变量D 全局变量

考题 单选题用以下方式声明的变量,()可以在整个程序中通用?A 在窗体模块用Dim进行声明B 在窗体模块用Public进行声明C 在窗体模块用Private进行声明D 在窗体模块用Static进行声明