问题
单项选择题
下列程序段的执行结果为
m=1
n=1
Select Case m
Case 1
Select Case n
Case 0
print"A"
Case 1
Print"B"
End Select
Case 2
Print"C"
End Select
A.A
B.B
C.C
D.0
答案
参考答案:B
解析: Select Case结构的一般格式为:
Select Case expr
[case expr1]
[clause1]
[ease expr2]
[clause2]
……
[ease Else]
[clausen]
End Select
其中expr是测试表达式,如果满足expr n,就执行这条语句,然后退出。