[单项选择题] 在窗体上画一个名为Command1的命令按钮,其Command1_Click事件过程如下。 Sub Command1_Click() Dim
2021-07-20
[单项选择题] 在窗体上画一个名为Command1的命令按钮,其Command1_Click事件过程如下。
Sub Command1_Click()
Dim student As studtype
Dim record_no As Integer
record n=1
With student
.ino=12
.strname="Smith"
.strsex=“男”
.smark=89
End With
______
Put # 1,record_no,student
Close # 1
End Sub
要求在c:的随机文件student..dat写入一条记录。应在程序中空行处填入以下哪条语句使该功能完整
A.Open"c:student.dat"For Input As # 1 len=len(student)
B.Open"c:student.dat:For random As # 1 len=len(student)
C.Open"c:student.dat"For Output As # 1 len=len(student)
D.Open"c:student.dat"For Append As # 1 len=len(student)
正确答案:B
参考解析:打开随机文件的一般格式为Open“文件名”For Random As#文件号[Len=记录长度]随机文件的写操作通过Put语句来实现,其格式为: Put#文件号,[记录号],变量
词条内容仅供参考,如果您需要解决具体问题
(尤其在法律、医学等领域),建议您咨询相关领域专业人士。
