网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
单选题
"程序中有两个过程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
②④
参考答案
参考解析
解析:
暂无解析
更多 “单选题"程序中有两个过程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 ②④” 相关考题
考题
在窗体上画一个命令按钮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
考题
设程序中有如下数组定义和过程调用语句: 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···
考题
如下图所示,只执行下列程序后,有Text1.Text=Text1,文本框不能出现“*****”的程序是______。A.Private Sub form_ Load() Text1. Text="*****"End SubB.Private Sub form_ Load() Text1. PasswordChar=“*”End SubC.Private Sub form_ Load() Text1. Visible="*****" End SubD.Private Sub form. Load() Text1. Text= String(5,"*")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 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
考题
设程序中有如下数组定义和过程调用语句: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)
考题
编写如下事件过程: 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 Commandl_Click ch$=“ABCDEF” proc ch:Print ch End Sub Private Sub proc(ch As Stnng) s=“” For k=Len(ch) TO 1 Step -1 s=sMid(ch,k,1) Next k ch=s End Sub A.ABCDEF B.FEDCBA C.A D.F
考题
执行下面的程序,消息框里显示的结果是( )。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和Command2,有如下程序: Private Sub Command1_Click() Print "Visual"; End Sub Private Sub Command2_Click() Print "Basic"; End Sub Private Sub Form_Load() CommandCancel=True Command1.Cancel=True End Sub 执行程序后,按键盘Cancel键,在窗体上输出的结果是A.BasicB.VisualC.CancelD.True
考题
下列程序的执行结果为 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、Text1和Text2,在属性窗口中把窗体的KeyPreview属性设置为True,然后编写如下程序: Diln S1 As String,S2 As String Private Sub Form. Load( ) Text1.Text="" Text2.Text="" Text1.Enabled=False Text2.Enabled=False End Sub Private Sub Form. KeyDown(KeyCode As Integer,Shift As Integer) S2=S2&Chr(KeyCode) End Sub Pri vate Sub Form. KeyPress(KeyAscii As Integer) S1=S1&Chr(KeyAscii) End Sub Private Sub Command1 Click( ) Text1.Text=S1 Text2.Text=S2 S1="" S2="" End Sub 程序运行后,先后按“a”、“b”、“c”键,然后单击命令按钮,在文本框Text1和Text2中显示的内容分别为( )。A.abc和ABCB.空白C.ABC和abcD.出错
考题
运行下列程序:Private Sub form_Click( )x = 8: y = 2Call fun1((x), y)Print x, yEnd SubPrivate Sub fun1(x, y)s = xx = s / yy = s Mod yEnd Sub单击窗体后,则在窗体上显示的结果是( )。A.4 2B.8 2C.8 0D.2 4
考题
下列程序的执行结果为 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
考题
在窗体上画一个名称为Commandl的命令按钮,然后编写如下事件过程: Private Sub Command1_Click() y = 8 Print fun1(1 + fun1(fun1(fun1(y)))*10) End Sub Private FLinctiOn fUnl(A)funl(A)= 1 + a End Function 程序运行后,单击命令按钮,则窗体上显示的内容是A.112B.2C.909090D.1001
考题
下列程序的执行结果为 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
考题
窗体Form. 1上有一个名称为Command 1的命令按钮,以下对应窗体单击事件的事件过程是A)Private Sub Form. 1_Click() B)Private Sub Form. _Click()End Sub End SubC)Private Sub Commandl_Click() D)Private Sub Command_ Click()End Sub End Sub
考题
"程序中有两个过程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 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 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
②④
热门标签
最新试卷