柠檬试题库
search
首页 计算机 公务员 驾照 关于

设在工程文件中有一个标准模块,其中定义了如下记录类型:Type Books Name As String * 10 TelNum As String * 20End Type在窗体上画一个名为Command1的命令按钮,要求当执行事件过程Command1_Click时,在顺序文件Person.txt中写入一条Books类型的记录。下列能够完成该操作的事件过程是( )。


  • A.Private Sub Command1_Click()Dim B As BooksOpen "Person.txt" For Output As #1
  • B.Name=InputBox("输入姓名")B.TelNum=InputBox("输入电话号码")Write #1, B.Name, B.TelNumClose #1End SubB.Private Sub Command1_Click()Dim B As BooksOpen "Person.txt" For Input As #1B.Name=InputBox("输入姓名")B.TelNum=InputBox("输入电话号码")Print #1, B.Name, B.TelNumClose #1End Sub
  • C.Private Sub Command1_Click()Dim B As BooksOpen "Person.txt" For Output As #1B.Name=InputBox("输入姓名")B.TelNum=InputBox("输入电话号码")Write #1, BClose #1End Sub
  • D.Private Sub Command1_Click()Open "Person.txt" For Input As #1Name=InputBox("输入姓名")TelNum=InputBox("输入电话号码")Print #1, Name, TelNumClose #1End Sub
热度🔥239
参考答案:A
解析:打开微信小程序查看本题解析