问题 单项选择题

下列程序的执行结果为()。  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 Sub

A.1

B.2

C.随机输出1或2

D.程序有错

答案

参考答案:D

解析:此题考查是条件浯句的结构。条件语句可以分为三种类型,如下:  If Then结构  If Then Else结构  Select Case结构  而If Then结构有两种格式:  条件Then语句  条件Then  语句块  End If

多项选择题
单项选择题 A1/A2型题