有关P50的叙述,哪一项是错误的()
第1题:
运行以下程序后,输出结果为_____________。 Private Sub Command1_Click() a=1:b=2:c=3 Call test(a,b+3,(c)) Print "main:";a;b;c End Sub Private Function test(p,m,n) p=p+1:m=m+1:n=n+1 Print "sub:";p;m;n End Function
:A. sub:2 6 4 main:1 2 3
B. sub:2 6 4 main:2 2 3
C. sub:2 6 4 main:2 6 4
D. sub:2 6 4 main:1 6 4
第2题:
设程序中有如下数组定义和过程调用语句: 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)
第3题:
下列关于Sub过程的叙述正确的是A.一个Sub过程必须有一个Exie Sub语句B.一个Sub过程必须有一个Enb Sub语句C.在Sub过程中可以定义一个Function过程D.可以用Goto语句退出Sub过程
第4题:
在窗体中添加一个命令按钮,编写如下程序: Private Sub Test(p,m,n) p=p+1:m=m+1:n=n+1 Print "Sub: ";p;m;n End Sub Private Sub Command1.Click() a1=1:b=2:c1=3 Call Test((a,b1+3,(c1)) Print "Main:";a1;b1;c1 End Sub 程序运行后,输出结果为
A.Sub: 2 6 4 Main: 2 6 4
B.Sub: 2 6 4 Main: 2 6 4
C.Sub: 2 6 4 Main: 1 2 3
D.Sub: 2 6 4 Main: 2 2 3
第5题:
下列Sub 过程中描述错误的是______。
A.Sub 过程只能在窗体模块中定义
B.Goto 语句不能用于Sub 过程
C.Sub 过程只能在窗体模块中定义
D.Sub 过程中不能嵌套定义Sub 过程
第6题:
A、Public Sub Sum(x ; y)
B、Public Sub Sum(ByVal x, ByVal y)
C、Public Sub Sum(x As Integer,y As Integer)
D、Public Sub Sum(x%, y%)
第7题:
下列程序的执行结果是______。
PrivateFunctionP(NASInteger)
Fori=1 To N
SUM=SUM+i
Nexti
P=SUM
End Function
Privte Sub Commandl_Click()
S=P(1)+P(2)+P(3)+P(4)
Print S
End Sub
第8题:
下面程序: Private Sub Form. _Click () Dim x, y, z As Integer x=5 y=7 z=0 Call P1(x, y, z) Print Str (z) End Sub Sub P1 (ByVal a As Integer, ByVal b As Integer , c As Integer) c= a+b End Sub 运行后的输出结果为______。
A.0
B.12
C.Str(z)
D.显示错误信息
第9题:
设程序中有如下数组定义和过程调用语句:
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)
第10题:
当发生Form_Click事件时,下列程序的输出结果是( )。 Private m As Integer,n As Integer Private Sub Form_Click() Dim k As Integer,p As Integer k=6:p=60 Call sub1(k,p) Print m,n,m,k,p Call sub1(k,p) Print m,n,k,p End Sub Private Sub Form_Load() m=7 n=70 End Sub Public Sub sub1(x As Integer,ByVal y As Integer) Dim m As Integer n=n+5 m=n+x+y x=x+y y=x+y End Sub
A.7 75 66 60 7 80 126 60
B.7 75 66 60 7 75 126 60
C.7 75 66 60 7 80 66 60
D.7 75 66 60 7 75 66 60