[单项选择题] 窗体上有两个名称分别为Text1、Text2的文本框,一个名称为Command1的命令按钮。设有如下的类型声明: Type Person name As String*8 m
[单项选择题] 窗体上有两个名称分别为Text1、Text2的文本框,一个名称为Command1的命令按钮。设有如下的类型声明: Type Person name As String*8 major As String*20 End Type 当单击“Command1”按钮时,能够正确地把数据写入文件的程序段是______。
A.Private Sub Command1_Click() Dim p As Person name=Text1. Text major=Text2. Text Open"C:dat dat" For Random As #1 Put #1, 1, p Close #1 End Sub
B.Private Sub Command1_Click() Dim p As Person name=Text1.Text major=Text2. Text Open"C:dat dat" For Random As #1 Get #1, 1, p Close #1 End Sub
C.Private Sub Command1_Click() Dis p As Person name=Text1. Text major=Text2. Text open "C:dat dat" For Random As #1 Len=Len( Put #1, 1, p Close #1 End Sub
D.Private Sub Command1_Click() Dim p As Person name=Text1. Text major=Text2. Text Open "C:dat dat" For Random As #1=Len( Get #1, 1, p Close #1 End Sub
参考答案: