单选题定义两个过程Private Sub Fun 1(S as String)和Private Sub Fun2 (a( )as String*6),在调用过程中用Dim St (6) as String*6定义了一个字符串数组。下面调用语句中正确的有()。 ①Call Fun1(St(3)) ②Call Fun2(St) ③Call Fun1(St) ④Call Fun2(st(6))A①②B①③C②③D②

单选题
定义两个过程Private Sub Fun 1(S as String)和Private Sub Fun2 (a( )as String*6),在调用过程中用Dim St (6) as String*6定义了一个字符串数组。下面调用语句中正确的有()。 ①Call Fun1(St(3)) ②Call Fun2(St) ③Call Fun1(St) ④Call Fun2(st(6))
A

①②

B

①③

C

②③

D


参考解析

解析: 暂无解析

相关考题:

在窗体上画一个命令按钮Command1和两个文本框,名称分别为Text 1和 Text 2 Text 2。编写如下两个事件过程: Dim str As String, strl As String Private Sub form_load() TextText = " " TextText = " " TextEnabled = False TextEnabled = False End Sub Private Sub Form. KeyPress(KeyAscii As Integer) str= strChr(KeyAscii) End Sub Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) str1 = strlChr(KeyCode) End Sub Private Sub Command1_Click() TextText =str TextText = str1 str= " " str1= " " End Sub 当在设计阶段把窗体KeyPreview属性设置为True时,程序运行过程中,在键盘上输入小写字母abc,然后单击命令按钮,则文本框Text1中显示的内容为 ______ 。A.abcB.不显示任何信息C.ABCD.出错

在窗体上画一个命令按钮和两个文本框,其名称分别为Command1、Text1和Text2,然后编写如下程序: Dim S1 As String,S2 As String Private Sub Form_Load() Text1.Text="" Text2.Text="" End Sub Private Sub Text1_KeyDown(KeyCode As Integer,Shift As Integer) S2=S2 Chr(Keycode) End Sub Private Sub Text1_KeyPress(KeyAscii As Integer) S1=S1 Chr(KeyAscii) End Sub Private Sub Command1_Click() Text1.Text=S2 Text2.Text=S1 S1="" S2="" End Sub 程序运行后,在Text1中输入“abc”,然后单击命令按钮,在文本框Text1和Text2中显示的内容分别为______。A.abc和ABCB.abc和abeC.ABC和abcD.ABC和ABC

在窗体上有一个命令按钮Commandl,通用过程fun和命令按钮的事件过程如下: Private Function fun(By m As Integer) If m Mod 2=0 Then fun=2 Else Fun=1 Else If End Funcion Private Sub Commandl_Click() Dim i Integer,s As Integer s=0 For i=1 To 5 s=s+fun(i) Next Print s End Sub 程序运行后,单击命令按钮,则窗体上输出A.6 B.7 C.8 D.9

设程序中有如下数组定义和过程调用语句: Dim a(10)As Integer … Call D(a) 如下过程定义巾,正确的是( )。A.Private Sub p(a As Integer)B.Private Sub p(a( )As Integer)C.Private Sub p(a(10)As Integer)D.Private Sub p(a(n)As Integer)

数组A在子过程或函数中定义为形参,正确的语句是( )。 A、Private Sub sele(ByVal A( ) As integer)B、Private Function sale(A() As Integer) As StringC、Private Sub sale(A() As Integer) As IntegerD、Private Sub sale(A(i) As Integer)

如下图所示的两个窗体:要使其中第一个窗体中的第一个命令按钮来控制显示第二个窗体,第二个命令按钮用来结束程序的运行(两个按钮名称为Command1和Command2)。则以下选项中,对这两个命令按钮编写的事件过程正确的是A.Private Sub Command1 Click() Form2.Show 1 End Sub Private Sub Command2_Click()End End SubB.Private Sub Command1_Click() Show 1 End Sub Private Sub Conunand2_Click() End End SubC.Private Sub Conmmand1_Click() Show 1 End Sub Private Sub Command2_Click() End End SubD.Private Sub Command1_Click()Show 1, Form2 End SubPrivate Sub Command2_Click() End End Sub

窗体Form1上有一个名称为Command1的命令按钮,以下对应窗体单击事件的事件过程是( )。A.Private Sub Form1 Click( )End Sub···B.Private Sub Form1. Click( )End Sub···C.Private Sub Command1 click( )End Sub···D.Private Sub Command Click( )End Sub···

单击一次窗体之后,下列程序代码的执行结果为______。 Private Sub Command1_ Click() Dim x As Integer, y As Integer, z As Integer x = 1: y = 2: z = 3 Call fun1 (x, y, z) Print x; y; z Call fun2(x, y, z) Print x; y; z End Sub Private Sub fun1(x As Integer, y As Integer, z As Integer) x = 10 * z y=z*z+ x z=x+ y+ z End Sub Private Sub fun2 (ByVal x As Integer, ByVal y As Integer, ByVal z As Integer) x=10*z y=z*z+ x z=x+ y +z End SubA.1 2 3 30 39 72B.1 2 3 1 2 3C.30 39 72 1 2 3D.30 39 72 30 39 72

在窗体上绘制一个名称为Command1的命令按钮,然后编写如下通用过程和命令按钮的事件过程: Private Function fun(ByVal m As Integer) If m Mod 2=0 Then fun=2 Else fun=1 End If End Function Private Sub Command1_Click() Dim i As Integer,s As Integer s=0 For i=1 To 5 s=s+fun(i) Next Print s End Sub 程序运行后,单击命令按钮,在窗体上显示的是A.6B.7C.8D.9

在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程: Private Sub Command1_Click () Dim a As Integer, b As Integer, c As Integer a = 1: b = 2: c = 3 Print fun2 (c, b,A)End Sub Private Function funl (x As Integer, y As Integer, z As Integer) fun1 = 2 * x + y + 3 * z End Function Private Function fun2(x As Integer, y As Integer, z As Integer) fun2 = fun1(z, x, y)+ x End Function程序运行后,单击命令按钮,则窗体上显示的内容是A.7B.14C.17D.30

假定有以下函数过程: Function Fun(S As String)As String Dimsl As String Fori=1 To Len(S) s1=UCase(Mid(S,i,1))+s1 Nexti Fun=s1 End Function 在窗体上画一个命令按钮,然后编写如下事件过程: Private Sub Commandl_Click() DimStrl As String,Str2 As StrA.abcdefgB.ABCDEFGC.gfedcbaD.GFEDCBA

设程序中有如下数组定义和过程调用语句:Dim a(10) as integer……Call p(a)如下过程定义中,正确的是A)Private Sub p(a as integer)B)Private Sub p(a() as integer)C)Private Sub p(a(10) as integer)D)Private Sub p(a(n) as integer)

在窗体上画一个名称为Command1的命令按钮,然后编写如下通用过程和命令按钮的事件过程; Private Function fun(ByVal m As Integer) If m Mod 2=0 Then fun=2 Else fun=1 End If End Function Private Sub Command1_C1ick() Dim i As Integer, s As Integer s=0 For i=1 To 5 s=s+fun(i) Next Print s End Sub 程序运行后,单击命令按钮,在窗体上显示的是______。A.6B.7C.8D.9

编写如下事件过程: Private sub sub1 (ByVal x1 As String, y1 As String) Dim xt As String Dim i As Integer i = Len(x1) Do While i>= 1 xt = xt + Mid(x1, i, 1) i=i-1 Loop y1 = xt End Sub Private Sub Form. Click() Dim s1 As String, s2 As String s1= "teacher" sub1 s1, s2 Print s2 End Sub 程序运行后,单击窗体,则窗体上显示的内容是A.rehcaetB.tahreeeC.themeeD.eerthea

执行下面的程序,消息框里显示的结果是( )。Private Sub Form_Click()Dim Str As String,S As String,k As IntegerS=StrFor k=Len(Str) To 1 Step -1S=S (Mid(Str,k,1)Next kEnd Sub

一个工程中包含两个名称分别为Form1、Form2的窗体,一个名称为Func的标准模块。假定在Form1和Func中分别建立了自定义过程,其定义格式为: Form1中定义的过程: Private Sub Fun1() ...... End Sub Func中定义的过程: Public Sub Fun2() ...... End Sub 若要在窗体For2g调用Porm1和Func中分别建立的自定义过程,则调用格式正确的是 ( )A.Call Form1. Funl() Func.Fun2()B.Call Form1. Fun1() Call Fun2()C.Form1. Fun1() Func. Fun2()D.Fun1() Fun2()

单击窗体时,下列程序的执行结果是 Private Sub Invert(By Val xstr As String,ystr As String) Dim tempstr AS String Dim I AS Integer I=Len(xstr) Do While I>=1 tempstr=tempstr + Mid(xstr,I,1) I=I - 1 Loop ystr=tempStr End Sub Private Sub Form_Click( ) Dim s1 As String,s2 As String S1="abcdef" Invert S1,S2 Print S2 End SubA.abcdefB.afbecdC.fedcbaD.defabc

在窗体上有一个命令按钮Command1,通用过程fun和命令按钮的事件过程如下: Private Function fun(ByVal m As Integer) If m Mod 2 = 0 Then fun=2 Else fun=1 End If End Function Private Sub Command1_Cliek() Dim i As Integer, s As Integer s=0 For i=1 To 5 s=s+fun(i) Next Print s End Sub 程序运行后,单击命令按钮,则窗体上输出( )。A.6B.7C.8D.9

下列程序的执行结果为 Private Sub Command1_C1ick( ) Dim sl As String,s2 AS String s1="abcdef" Call lnvert(s1,s2) Print s2 End Sub Private Sub lnvert(ByVal xstr As String,ystr As String) Dim tempstr As Stdng i=Len(xstr) Do While i>=1 tempstr=tempstr+Mid(xstr,i,1) i=i-1 Loop ystr=tempstr End SubA.fedcbaB.abcdefC.afbecdD.defabc

在窗体上画一个名称为Command1的命令按钮,然后编写如下通用过程和命令按钮的事件过程: Private Function fun(ByVal m As Integer) If m Mod 2=0 Then fun=2 Else fun=1 End If End Function Private Sub Command1_Click( ) Dim i As Integer,s As Integer S=0 For i=1 To 5 s=s+fun(i) Next Print 3 End Sub 程序运行后,单击命令按钮,在窗体上显示的是A.6B.7C.8D.9

一个工程中包含两个窗体,名字分别为Form1、Form2,以及一个名为MyFun的标准模块。假定在Foma1、Form2和MyFun中分别建立了自定义过程,其定义格式为: Form. 1 中定义的过程: Private Sub Fun 1 () …… End Sub Form. 2 中定义的过程: Private Sub Fun 2 () …… End Sub MyFun 中定义的过程: Private Sub fun 3 () …… End Sub在调用上述过程中,如果不指明窗体或者模块的名称,则以下叙述中正确的是______。A.只有MyFun 过程能够被工程中各个窗体或者模块调用B.Fun1和Fun3过程能够在工程中各个窗体或者模块中被调用C.上述3个过程都只能在各自被定义的模块中调用D.上述3个过程可以在工程中的任何窗体或者模块中被调用

下列程序的执行结果为 Private Sub Command1_Click() Dim s1 As String,s2 As String S1;="abcdef" Call Invert(s1,s2) Print s2 End Sub Private Sub Invert (ByVal xstr As String,ystr As String) Dim tempstr As String i=Len(xstr) Do While i=1 tempstr=tempstr+Mid(xstr,i,1) i=i-1 Loop ystr=tempstr End SubA.fedcbaB.abcdefC.afbecdD.defabc

下列程序的执行结果为 Private Sub Commandl_Click() Dim s1 As String ,s2 As String s1= "abcd" Call Transfer(sl,s2) Print s2 End Sub Private Sub Transfer (ByVal xstr As String,ystr As String) Dim tempstr As String ystr=tempstr End SubA.dcbaB.abdcC.abcdD.dabc

窗体上有Text1、Text2两个文本框及一个命令按钮Command1,编写下列程序 Dim y As Integer Private Sub Command1_Click() Dim x As Integer X=2 Text1.Text=Fun2(Fun1(x),y) Text2.Text=Fun1(x) End Sub Private Function Fun1(x As Integer)As Integer x=x+y:y=x+y Fun1=x+y End Function Private Function Fun2(x As Integer,y As Integer)As Integer Fun2=2*x+y End Function 当单击1次和单击2次命令按钮后,文本框Textl和Text2内的值分别是A.2 4 2 4B.2 4 4 8C.10 10 58 58D.4 4 8 8

"程序中有两个过程Private Sub Fun1(S As String)和Private Sub Fun2(a()As String*6),在调用过程中用Dim St(6)As String*6定义了一个字符串数组。下面调用语句中正确的是() ①Call Fub1(St(3)) ②Call Fun2(St) ③Call Fun1(St) ④Call Fun2(St(6))A、①②B、①③C、②③D、②④

以下是子过程或函数过程定义中的开始语句,错误的为()。A、Private Function f( x As String ) As SingleB、Private Function f( x As String )C、Private Sub f( x As String ) As SingleD、Private Sub f( x As String )

单选题"程序中有两个过程Private Sub Fun1(S As String)和Private Sub Fun2(a()As String*6),在调用过程中用Dim St(6)As String*6定义了一个字符串数组。下面调用语句中正确的是() ①Call Fub1(St(3)) ②Call Fun2(St) ③Call Fun1(St) ④Call Fun2(St(6))A①②B①③C②③D②④