题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2023-10-10 12:27:04

[填空题]有如下用户定义类型及操作语句:
Type Student
SNo As String
SName As String
IAge As Integer
End Type
Dim Stu As Student
With Stu
.SNo="200609001"
.SName="陈果果"
.IAge=19
End With
执行MsgBox Stu. IAge后,消息框输出结果是______。

更多"有如下用户定义类型及操作语句: Type Student SNo"的相关试题:

[填空题]有如下用户定义类型及操作语句: Type Student SNo As String SName As String SAge As Integer End Type Dim Stu As Student With Stu SNo=“200609001” SName=”陈果果” Age=19 End With 执行MsgBox Stu.Age后,消息框输出结果是______。
[填空题]有如下用户定义类型及操作语句: Type Student SNo As String SName As String IAge As Integer End Type Dim StuAs Student With Stu SNo="200609001" SName="陈果果" IAge=19 End With 执行MsgBox Stu.IAge后,消息框输出结果是【 】。
[填空题]有如下用户定义类型及操作语句: Type Teacher TNo As String TName AS Strxng IAge As Integer End Type Dim Tea AS Teacher With Tea .TNO="20080001" .TName="张三" .IAge=32 End With 执行MsgBox Tea.TNaiqle后,消息框的输出结果是______。
[单项选择]设有如下的记录类型:
Type Student
Number As String
Name As String
Age As Integer
End Sub
则能正确引用该记录类型变量的代码是( )。
A. Student.name=""
B. Dim s As Students.name=“张红”
C. Dims As Tye Students.name=“张红”
D. DimsAsTypes.name=“张红”
[填空题]有如下用户定义类型及操作语句:
Type Teacher
TNo As String
TName As String
IAge As Integer
End Type
Dim Tea As Teacher
With Tea
.TNo="20080001"
.TName="张三"
.IAge=32
End With
执行MsgBox Tea.TName后,消息框的输出结果是______。
[填空题]设有如下记录类型:
Type student
Number As String*10
Name As String*8
End Type
窗体中有若干控件,单击其中的一个按钮Command1时,执行如下事件过程,该过程的功能是把数据输出到指定的文件中。根据题意,请完善下列程序。
Private Sub Command1_click( )
Dim stu As student
Open"C:/file. dat" For Random As #1 Len=Len( 【13】 )
Title $="写记录到随机文件"
Str1 $="请输入学生名"
Str2 $="请输入学生名"
For i=1 To 5
stu. Number=InputBox(Str1 $, Title $)
stu. Name=InputBox$(Str2 $, Title $)
【14】 #1, i, stu
Next i
Close 【15】
End Sub
[单项选择]有如下语句:
Type Student
Name As String
Age As Integer
Sex As String
End Type
Dim Stu As Student
With Stu
.Name="张红"
.Age=22
.Sex="女"
End With
执行Print Stu.Age语句后的结果是
A. 张红
B. 22
C. “女”
D. Age
[单项选择]若在窗体模块的声明部分声明了如下自定义类型和数组 Private Type rec Code As Integer:Caption As String End Type Dim arr(5) As rec 则下面的输出语句中正确的是
A. Print arr.Code(2), arr.Caption(2)
B. Print arr.Code, arr.Caption
C. Print arr(2).Code, arr(2).Caption
D. Print Code(2), Caption(2)
[单项选择]设在工程中有一个标准模块;并定义了如下类型: Type Stutype ino As Integer strname AS String*20 strsex As String*2 smark As Single End Type 在窗体上画一个名为Commandl的命令按钮,要求当执行事件过程Commandl_Click时,在C盘根目录下的随机文件Student.dat中写入一条记录。下列能够完成该操作的是( )。
A. Sub Commandl_Click() Dim student As Studtype Dim record_no As Integer record_no=1 With student .ino=12:.strname=“smith”: .strsex=“男”:.smark=89 End With Open“c:\Student.dat”For Input As#1 Len=Len(Student) Put#1.record_no.Student Close#1 End Sub
B. Sub Commandl_Click() Dim Student As Stutype Dim Record_no As Integer Record_no=1 With Student .ino=12:.stmame=“smith” .strsex=“男”:.smark=89 EndWith Open“c:\student.dat”For Random As#1 Len=Len(Student) Put#1.Record_no.Student Close#1 End Sub
C. Private Sub Commandl_Click() Dim Student As Stutype Dim Record_no As Integer Record_no=1 With Student .ino=12:.stmame=“smith” .strsex=“男”:.smark=89 End With Open“c:\student.dat”For Random As 1 Len=Len(Student) Write#1.Record_no.Student Close#1 EndSub
D. Sub Commandl_Click() Dim Student As Stutype Dim Record_no As Integer Record_no=1 With Student 、 .ino=12:.stmame=“smith” .strsex=“男”:.smark=89 EndWith Open“c:\student.dat”For Output As#1 Len=Len(Student) Put#1,Record_no.Student Close#1 End Sub
[填空题]假定在工程文件中有一个标准模块,其中定义了如下记录类型 Type Books Name As String * 10 TelNum As String * 20 End Type 要求在执行事件过程Command1_Click时,在顺序文件Person.txt中写入一条记录。将经下程序补充完整。 Private Sub Command1_Clickk( ) Dim B As Books open "c: /person. txt" For output As #1 B. Name = InputBox ("请输入姓名t" ) B. TelNum = InputBox("请输入电话号码" ) write #1, 【15】 close #1 End Sub
[填空题]设在工程中有一个标准模块,其中定义了如下记录类型: Type Books Name As String*10 telNum As String*20 End Type 在窗体上添加一个名为Command1的命名按钮,要求当执行事件过程Command1_Click时,在顺序文件 Person.txt中写入一条记录。请在 【14】 中填入适当的内容,将程序被补充完整。 Private Sub Command1_Click( ) Dim B As 【14】 Open"c:/person.txt"For Output As #1 B.Name=Input Box(“输入姓名”) B.TelNum=InputBox(“输入学号”) Write#I,B,Name,B.TelNum Close #1 End Sub
[单项选择]假字在窗体(名称为Forml)的代码窗口中定义如下记录类型:
Private Type animal
Anima1Name As String * 20
aColor As String * 10
End Type
在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程:
Private Sub Command1_Click( )
Dim rec As animal
Open"c: /vbTest.dat"For Random As#1 Len = Len(rec)
rec.animalName = "Cat"
rec.aColor = "White"
Pat#1 , rec
Close#1
End Sub
则以下叙述中正确的是
A. 记录类型animal不能在Form1中定义,必须在标准模块中定义
B. 如果文件c:/vbTest.dat不存在,则Open命令执行失败
C. 由于Put命令中没有指明记录号,因此每次都把记录写到文件的末尾
D. 语句"Put#1,rec"将animal类型的两个数据元素写到文件中
[填空题]设在工程中有一个标准模块,其中定义了如下记录类型
Type Books
Name As String*10
TelNum As string*20
End Type
在窗体上画一个名为Command1的命令按钮,要求当执行事件过程Command1_Click时,
在顺序文件Person.txt中写入一条记录。该操作的事件过程是 【15】
[填空题]设在工程中有一个标准模块,其中定义了如下记录类型: Type Books Name As String (10 TelNum As String *20 End Type 在窗体上添加一个名为Command1的命名按钮,要求当执行事件过程Command1 Click时,在顺序文件Person.txt中写入一条记录。请在横线中填入适当的内容,将程序补充完整。 Private Sub Command1_Click( ) Dim B As ______ Open."c:/Person.txt" For Output As #1 B.Name=InputBox(“输入姓名”) B.TelNum=InputBox(“输入学号”) Write#1, B.Name, B.TelNum Close #1 End Sub
[填空题]假定在工程文件中有一个标准模块,其中定义了如下记录类型。
Private Type Books
Name As String*10
TelNum As String#20
End Type
要求在执行事件过程Command1_Click时,在顺序文件Person.txt中写入一条记录。将以下程序补充完整。
Private Sub Command1_Click( )
DimB As Books
open“C/person.txt”For output As#1
B.Name=InputBox(“请输入姓名”)
B.TeINum=InputBox(“请输入电话号码”)
write#1, (9)
close#1
End Sub

我来回答:

购买搜题卡查看答案
[会员特权] 开通VIP, 查看 全部题目答案
[会员特权] 享免全部广告特权
推荐91天
¥36.8
¥80元
31天
¥20.8
¥40元
365天
¥88.8
¥188元
请选择支付方式
  • 微信支付
  • 支付宝支付
点击支付即表示同意并接受了《购买须知》
立即支付 系统将自动为您注册账号
请使用微信扫码支付

订单号:

截图扫码使用小程序[完全免费查看答案]
请不要关闭本页面,支付完成后请点击【支付完成】按钮
恭喜您,购买搜题卡成功
重要提示:请拍照或截图保存账号密码!
我要搜题网官网:https://www.woyaosouti.com
我已记住账号密码