网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
单击命令按钮时,下列程度段的执行结果为( )。 Pfivate Sub Command1_Click() Dima As Integer,b As Integer, c As Integer a=2:b=4:c=6 Call S1(a,B) Print "a=";a;"b=";b;"c=";c Call S2(a,B) Print "a=";a;"b=";b;"c=";c; End Sub Private Sub S1(x As Integer, y As Integer) Dim c As Integer x=2*x:y=y+2:c=x+y End Sub Sub S2(x As Integer, By Val y As Integer) Dim e As Integer x=2*x:y=y+2:e=x+y End Sub
A.a=4 b=6 c=6 a=4 b=6 c=6
B.a=8 b=6 c=6 a=8 b=6 c=6
C.a=4 b=6 c=6 a=8 b=6 c=6
D.a=8 b=6 c=6 a=4 b=6 c=6
参考答案
更多 “ 单击命令按钮时,下列程度段的执行结果为( )。 Pfivate Sub Command1_Click() Dima As Integer,b As Integer, c As Integer a=2:b=4:c=6 Call S1(a,B) Print "a=";a;"b=";b;"c=";c Call S2(a,B) Print "a=";a;"b=";b;"c=";c; End Sub Private Sub S1(x As Integer, y As Integer) Dim c As Integer x=2*x:y=y+2:c=x+y End Sub Sub S2(x As Integer, By Val y As Integer) Dim e As Integer x=2*x:y=y+2:e=x+y End SubA.a=4 b=6 c=6 a=4 b=6 c=6B.a=8 b=6 c=6 a=8 b=6 c=6C.a=4 b=6 c=6 a=8 b=6 c=6D.a=8 b=6 c=6 a=4 b=6 c=6 ” 相关考题
考题
设有命令按钮Command1的单击事件过程,代码如下:Private Sub Command1_Click()Dim a(3,3)As IntegerFor i=1 To 3For j=1 To 3a(i,j)=i*j+iNext jNext iSum=0For i=1 To 3Sum=Sum+a(i,4-i)Next iPrint SumEnd Sub运行程序,单击命令按钮,输出结果是( )。A.20B.7C.16D.17
考题
设有命令按钮Command1的单击事件过程,代码如下: Private Sub Command1 Click() Dim a(3,3)As Integer For i=1 To 3 For j=1 To 3 a(i,j)=i*j+i Next j Next i Sum=0 For i=1 To 3 Sum=Sum+a(i,4-i) Next i Print Sum End Sub 运行程序,单击命令按钮,输出结果是______。A.20B.7C.16D.17
考题
在窗体上有一个命令按钮,然后编写如下事件过程:Private Sub Command1_Click()Dim a(5) As StringFOR i=1 To 5a(i) =Chr(Asc("A") +(i-1))NextFor Each b In aPrint b;NextEnd Sub程序运行后,单击命令按钮,输出结果是A.ABCDEB.1 2 3 4 5C.abcdeD.出错信息
考题
在窗体上画一个命令按钮,然后编写如下事件过程:Private Sub Command1_Click()Dim a(5) As StringFor i = 1 To 5a(i) = Chr(Asc("A") + (i - 1))Next iFor Each b In aPrint b;NextEnd Sub程序运行后,单击命令按钮,输出结果是( )。A.ABCDEB.1 2 3 4 5C.abcdeD.出错信息
考题
在窗体上有一个命令按钮,然后编写如下事件过程。Private Sub Command1_Click()Dim a(5)As StringFOR i=1 To 5a(i)=Chr(Asc("A")+ (i-1))NextFor Each b In aPrint b;NextEnd Sub程序运行后,单击命令按钮,输出结果是A.ABCDEB.1 2 3 4 5C.abcdeD.出错信息
考题
在窗体上有一个命令按钮,然后编写如下事件过程: Private Sub Command1Click( ) Dim a(5)As String For i=1,To 5 a(i)=Chr(Asc("A")+(i-1)) Next i For Each b In a Print b; Next End Sub 程序运行后,单击命令按钮,输出结果是( )。A.ABCDEB.1 2 3 4 5C.abcdeD.出错信息
考题
在窗体画一个命令按钮,然后编写如下事件过程: Private Sub Commandl Click() Dim a(5)As String For i=1 To 5 a(i)=Chr(Asc("A")+(i-1)) Next i For Each b In a Print b; Next End Sub 程序运行后,单击命令按钮,输出结果是______。A. ABCDEB.1 2 3 4 5C.abcdeD.出错信息
考题
在窗体上有一个命令按钮,然后编写如下事件过程。 Private Sub Command1_Click() Dim a(5)As String FOR i=1 To 5 a(i)=Chr(Asc("A")+(i-1)) Next For Each b h a Print b; Next End Sub 程序运行后,单击命令按钮,输出结果是A.ABCDEB.1 2 3 4 5C.abcdeD.出错信息
考题
单击命令按钮时,下列程序段的执行结果为( )。 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
热门标签
最新试卷