首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
设在工程中有一个标准模块,其中定义了如下记录类型 Type Books Name As String* 10 TelNum As String * 20 End Type 在窗
设在工程中有一个标准模块,其中定义了如下记录类型 Type Books Name As String* 10 TelNum As String * 20 End Type 在窗
admin
2009-03-15
36
问题
设在工程中有一个标准模块,其中定义了如下记录类型 Type Books Name As String* 10 TelNum As String * 20 End Type 在窗体上画一个名为 Command1的命令按钮,要求当执行事件过程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
B、Private Sub Command1_Click( ) Dim B As Books Open "c:\Person.txt, For Input As # 1 B.Name = lnputBox("输入姓名") B.TelNum = InputBox("输入电话号码") Print #1, B.Name, B.TelNttm
C、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 Close #
D、Private Sub Command1_Click( ) Dim B As Books Open"c:\Person.txt" For Input As #1 Name=InputBox("输入姓名") TelNum=InputBox("输入电话号码") Print #1,Name,TelNum Close #1 End Sub
答案
1
解析
A选项正确。
B选项向文件中输出内容,打开方式应当为For output。
C选项记录变量不可以对元素整体输入输出。
D选项记录变量的输入和输出都必须指明到记录元素。格式为:记录变量.元素名。
转载请注明原文地址:https://jikaoti.com/ti/XJq0FFFM
本试题收录于:
二级VB题库NCRE全国计算机二级分类
0
二级VB
NCRE全国计算机二级
相关试题推荐
以下程序计算1+1/3+1/5+…1/(2N+1),直至1/(2N+1)小于0.00001,请在横线处将程序补充完整。publicclassSun{publicstaticvoidmain(Stringargs[]){
在Java语言中,类按照程序设计所需要的常用方法和接口封装成【】。
有关线程的哪些叙述是对的?()Ⅰ:一旦一个线程被创建,它就立即开始运行Ⅱ:使用start()方法可以使一个线程成为可运行的,但是它不一定立即开始运行Ⅲ:当一个线程因为抢先机制而停止运行时,它被放在可运行队列的前面
结构化程序设计所规定的3种基本控制结构是()。
设有如下程序:publicclassSun{publicstaticvoidmain(Stringargs[]){intx,y;
下列安全控制命令中,用于管理密钥库和证书的是()。
下列叙述中正确的是
软件设计中模块划分应遵循的准则是
给一个short类型变量赋值的范围是
本程序的功能是监听对于菜单项和工具条按钮的操作。主窗口中有菜单、工具条和一个文字标签,菜单中有“文件”项,“文件”菜单中包括菜单项“新建”、“保存”、“打印”、“页面设置”和“退出”,工具条上包括按钮“新建”、“保存”、“打印”、“页面设置”和“退出”。单
随机试题
经紧急处理后,患儿血压140/105mmHg,继续治疗的措施是为预防患儿出现抽搐,下列哪项治疗措施妥当
纳税人未按照规定使用税务登记证件,或者转借、涂改、损毁、买卖、伪造税务登记证件的,处2000元以上1万元以下的罚款;情节严重的处以()。(2002年)
患者男,23岁。1天前从高处跳下,右足跟先着地。当时即感右足疼痛,但仍能行走。行走时右足跟着地处疼痛明显。查体:右足略肿胀,右跟骨周围和跟腱有压痛,无畸形,无异常活动和骨擦音。此角度的正常值是
注射部位定位,下列哪项是错误的
用灵敏度法检查杂质时,若杂质限量符合规定,则反应
脉浮而大,来盛去衰是
某钢铁集团冷轧厂罩式炉退火作业区脱脂机组试生产时,某操作工在配置碱液过程中发生意外,造成碱液喷射至其面部。针对上述意外事件,应第一时间采取的应急措施是()。
下列错误中,能够通过试算平衡查找的有()。
该企业经营的下列商品中,需求处于稳定形态的有()。对于需求处于稳定形态的鞋、蔬菜、牙膏等商品,最适宜的预测方法是()。
KatharineGrahamgraduatedfromtheUniversityofChicagoin1938andgotajobasanews【B1】______inSanFrancisco.Katharine
最新回复
(
0
)