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

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

单击命令按钮时,下列程序段的执行结果为( )。

A. 8

B. 6

C. 4

D. 2


参考答案

更多 “ 单击命令按钮时,下列程序段的执行结果为( )。A. 8B. 6C. 4D. 2 ” 相关考题
考题 单击命令按钮时,下列程序段的执行结果为( )。A.8B.6C.4D.2

考题 单击命令按钮时,下列程序的执行结果是 Private Sub Book( x As Integer) x=x*2+1 If x<6 Then Call Book(x) End If x=x * 2 + 1 Print x; End Sub Private Sub Command2_Click( ) Book 2 End SubA.23 47B.10 36C.22 44D.24 50

考题 单击命令按钮时,下列程序代码的执行结果为______ 。Public Function MyFune(m As Integer,n As Integer) As Integer Do While m<>n Do While m>n m=m-n Loop Do While m<n n=n -m Loop Loop MyFunc=mEnd FunctionPrivate Sub Command1_Click() Print MyFunc(24, 18)End SubA. 2B.4C.6D.8

考题 若看到程序中确以下事件过程,则可以肯定的是,当程序运行时( )。 Private Sub Click—MouseDown(Button As Integer,Shift As Integer,X As Single,Y As Single) Print"VB Program" End SubA.用鼠标左键单击名称为“Command1”的命令按钮时,执行此过程B.用鼠标左键单击名称为“MouseDown”的命令按钮时,执行此过程C.用鼠标右键单击名称为“MouseDown”的命令按钮时,执行此过程D.用鼠标左键或右键单击名称为“Click”的命令按钮时,执行此过程

考题 若看到程序中确以下事件过程,则可以肯定的是,当程序运行时( )。Private Sub Click—MouseDown(Button As Integer,Shift As Integer,X As Single,YAs Single)PrintVB ProgramEnd SubA.用鼠标左键单击名称为“Command1”的命令按钮时,执行此过程B.用鼠标左键单击名称为“MouseDown”的命令按钮时,执行此过程C.用鼠标右键单击名称为“MouseDown”的命令按钮时,执行此过程D.用鼠标左键或右键单击名称为“Click”的命令按钮时,执行此过程

考题 单击命令按钮时,下列程序段的执行结果为( )。 Public Sub Procl(n As Integer,ByVal m As Integer) n=n Mod 10 m=m\10 End Sub Private Sub Command1_Click() Dim x As Integer,y As Integer x=12;y=34 Call Procl(x,y) Print x;y End SubA.12 34B.2 34C.2 3D.12 3

考题 单击命令按钮时,下列程序段的执行结果为( )。 Private Sub Command1_Click() Dim FirstStr As String FirstStr="abcdef" Print PickMid(FirstStr) End Sub Private Function PickMid(xStr As String)As String Dim tempStr As String,strLen As Integer TempStr=" " strLen=Len(xStr) i=1 Do While i<=strLen/2 tempStr=tempStr+Mid(xStr,i,1)+Mid(xStr,strLen-i+1,1) i=i+1 Loop PickMid=tempStr End FuncfionA.abcdefB.fedC.fedcbaD.defabc

考题 单击命令按钮时,下列程序的执行结果是 Private Sub Book(x As Integer) x=x * 2 + l If x<6 Then Call Book(x) End If X=X * 2 + 1 Print x; End Sub Private Sub Command2_Click() Book2 End SubA.23 47B.10 36C.22 44D.24 50

考题 单击命令按钮,下列程序段的输出结果为______。 Private Sub Command1_Click() Dim n As Integer n = 5 While n <= 10 n = n + 2 Print n; Wend End SubA.5 7 9 11B.6 8 10C.7 9 11D.6 8 10 12

考题 单击命令按钮时,下列程序代码的执行结果为 Private Sub Command1_Click( ) Print MyFunc(24,18) End Sub Public Function MyFunc(m As Integer,n As Integer)As Integer Do While m ◇ n Do While mn:m=m—n:Loop DO While m<n:n=n-m:Loop Loop My Func=m End FunctionA.2B.4C.6D.8