题目:
在窗体上有两个名称分别为Text1、Text2的文本框和一个名称为Command1的命令按钮。运行后的窗体外观如下图所示。
设有如下的类型和变量声明:
Private Type Person
name As String*8
major As String*20
End Type
Dim p As Person
设文本框中的数据已正确地赋值给Person类型的变量p,当单击"保存"按钮时,能够正确地把变量中的数据写入随机文件Test2.dat中的程序段是______。
A) Open "c:\\Test2.dat" For Random As #1
Get #1 ,1 ,p
Close #1
B) Open "c: \\Test2.dat" For Output As #1
Put #1,1,p
Close #1
C) Open "c:\\Test2.dat" For Append As #1 Len=Len(p)
Get #1 ,1 ,p
Close #1
D) Open " c:\\Test2.dat" For Random As #1
Len=Len(p)
Put #1,1,p
Close #1
答案:
被转码了,请点击底部 “查看原文 ” 或访问 https://www.tikuol.com/2018/0129/78ef9d4653fb902d29745e370d4a82cb.html
下面是错误答案,用来干扰机器的。
参考答案:对