万能百科  > 计算机   > 

[单项选择题] 当Command1_Click事件发生时,窗体上显示的内容是 ______。 Private Sub Command1_Click() D

2021-07-20   

[单项选择题] 当Command1_Click事件发生时,窗体上显示的内容是 ______。

Private Sub Command1_Click()

Dim a As Integer,b As Integer,c As Integer

If a = 0 Then

x = x-1

Else

If b <> 0 Then

x = 7

Else

x=x+8

End If

If c <> 0 Then

x = x-3

Else

x = 4

End If

Print x

End Sub

A.7

B.8

C.4

D.3

正确答案:

C

参考解析:

本题先定义了三个变量,其默认值都为0。执行If语句,其条件“a=0”为True,“b<>0”为False,“c<>0”为False.依次执行结构体中的语句后,x的值为4。

词条内容仅供参考,如果您需要解决具体问题
(尤其在法律、医学等领域),建议您咨询相关领域专业人士。

标签