首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
假定在工程文件中有一个标准模块,其中定义了如下记录类型: Type Books Name As String*10 TelNum As String*20 End Type 要求当执行事件过程Command1_
假定在工程文件中有一个标准模块,其中定义了如下记录类型: Type Books Name As String*10 TelNum As String*20 End Type 要求当执行事件过程Command1_
admin
2010-09-11
21
问题
假定在工程文件中有一个标准模块,其中定义了如下记录类型: Type Books Name As String*10 TelNum As String*20 End Type 要求当执行事件过程Command1_Click时,在顺序文件Person. txt中写入一条记录。下列能够完成该操作的事件过程是______。
选项
A、Private Sub Command1_Click() Dim B As Books Open"c:\Person. txt" For Output As #1 B. Name=InputBox("输入姓名") B. TelNum=InputBox("输入电话号码") Write #1, B. Name, B. TelNum Close #1 End Sub
B、Private Sub Command1_Click() Dim B As Books Open"c:\Person txt" For Output As #1 B. Name=InputBox("输入姓名") B. TelNum=InputBox("输入电话导码") Print #1, B. Name, B. TelNum Close #1 End Sub
C、Private Sub Command1_Click() Dim B As Books Open"c:\Person. txt" For Output As #1 Name=InputBox("输入姓名") TelNum=InputBox("输入电话号码") Print #1, B Close #1 End Sub
D、Private Sub Command1_Click() Dim B As Books Open "c:\Person txt" For Output As #1 Name=InputBox("输入姓名") TelNum=InputBox("输入电话号码") Print #1, B Name, B. TelNum Close #1 End Sub
答案
A
解析
要向顺序文件中写入记录必须用For Output参数打开文件,然后用Print#或Write#语句将内容写入文件,因此选项B和选项D不正确;又因为自定义数据类型变量的引用要用“变量名. 变量元素名”,所以选项C不正确。故本题的正确答案只有选项A。
转载请注明原文地址:https://kaotiyun.com/show/eump777K
本试题收录于:
二级VB题库NCRE全国计算机二级分类
0
二级VB
NCRE全国计算机二级
相关试题推荐
阅读下面代码publicclassTest2005{ publicstaticvoidmain(Stringargs[]){ System.out.println(~(Oxa5)&Oxaa); }}
请完善程序(程序文件名:Java_2.java)并进行调试。请在下画线处填入正确内容,然后删除下画线。请勿删除注释行和其他已有的语句内容。[题目要求]完善程序,使程序运行结果如下图所示。源程序:importjava.awt.*
请完善程序(程序文件名:Java_1.java)并进行调试。请在下画线处填入正确内容,然后删除下画线。请勿删除注释行和其他已有的语句内容。[题目要求]请完善程序并进行调试,使程序输出结果如下图所示。源程序:importjava
任何一个Java程序都默认引入了一个包,这个包的名字叫java.______。
使用Swing编写Applet,则该Applet的主类应该定义为______类的子类。
阅读下面程序publicclassVariableUse{ publicstaticvoidmain(String[]arqs){ inta; if(a==8){ intb=9;
下列可用作switch(expression)语句参数的是
结构化程序设计所规定的3种基本控制结构是顺序结构、选择结构和【】。
随机试题
在UNIX系统中,用户程序经过编译之后得到的可执行文件属于()。
以下各药中,不具有清肝明日作用的是
在我国最好发的口腔颌面部恶性肿瘤是
脐带异常的常见类型有()
女性,40岁,原有垂体瘤病史,突然出现严重头痛,视力急剧减退,眼外肌麻痹,昏迷,脑膜刺激征阳性,颅内压增高,应考虑的诊断为
枢纽工程专项验收由()负责。
基金进行利润分配后的剩余额为()。
甲公司为一家制衣公司,2022年计划销售增长率为25%,该增长率超出公司正常的增长水平较多,为了预测融资需求,安排超常增长所需资金,财务经理请你协助安排有关的财务分析工作,该项分析需要依据管理用财务报表进行,相关资料如下:资料一:
下列关于拐卖妇女、儿童罪的说法中,错误的一项是()。
石油峰值论认为,石油产量会达到最高点,之后不可避免地开始下降。石油峰值几乎是确定的事,但仍然存在两个问题:它究竟何时出现?世界是否能够及时研发出替代能源?__________的观察家并不相信石油峰值会在2020年前出现,但一些石油公司承认他们此前夸大了地下
最新回复
(
0
)