未分类题

在窗体上画两个标签和一个命令按钮,其名称分别为Label1、Label2和Command1,然后编写如下程序:Private Sub func(L As Label,ByVal a As Integer) L.Caption='1234' a=a*aEnd SubPrivate Sub Form_ Load() Label1.Caption='ABCD' Label2.Caption=10End SubPrivate Sub Command1_Click() a=Val(Label2.Caption) Call func (Label1,a)Label2.Caption=aEnd Sub 程序运行后,单击命令按钮,在两个标签Label1和Label2中显示的内容分别是______。
A.ABCD和10
B.1234和100
C.ABCD和100
D.1234和10

A.Caption='1234'
B.Caption='ABCD'
C.Caption=10End
D.Caption)
E.Caption=aEnd
F.ABCD和10
B.1234和100
C.ABCD和100

【参考答案】

D
解析:单击命令按钮后变量a赋初值a=10,通过Call调用函数后,Label1.Caption=“1234”......

(↓↓↓ 点击下方‘点击查看答案’看完整答案 ↓↓↓)