首页 > 计算机等级考试
题目内容 (请给出正确答案)
[主观题]

有如下的记录类型Type studentid As Stringname As Stringage As IntegerEnd Type则正确引用

有如下的记录类型

Type student

id As String

name As String

age As Integer

End Type

则正确引用该记录类型变量的代码是()

A.student.name=”Sias”

B.Dim s As student

s.mane=”Sias”

C.Dim s As type student

s.name=”Sias”

D.Dim s As type

s.name=”Sias”

查看答案
答案
收藏
如果结果不匹配,请 联系老师 获取答案
您可能会需要:
您的账号:,可能还需要:
您的账号:
发送账号密码至手机
发送
安装优题宝APP,拍照搜题省时又省心!
更多“有如下的记录类型Type studentid As Stri…”相关的问题
第1题
假设有如下的记录类型:Type Studentnumber As Stringname AS Stringage As IntegerEnd Type则正

假设有如下的记录类型: Type Student number As String name AS String age As Integer End Type 则正确引用该记录类型变量的代码是______。

A.Student. name="" s. name="张红"

B.Dim s As Student s. Dame="张红"

C.Dim s As Type Student s. name="张红"

D.Dim s As Type s. name="张红"

点击查看答案
第2题
由如下程序:Type Student Num As Integer Name As String * 13 End TypeDim stu(30)As Student该

由如下程序: Type Student Num As Integer Name As String * 13 End Type Dim stu(30)As Student 该程序段定义了两个程序成分,它们分别是 ______。

A.记录类型和记录数组

B.记录类型和记录变量

C.显示类型和记录数组

D.记录变量和记录数组

点击查看答案
第3题
设在工程中定义了如下类型:Type stutypeino As Integerstmame As String*20strsex As String*1sm

设在工程中定义了如下类型: Type stutype ino As Integer stmame As String*20 strsex As String*1 smark As Single End Type 在窗体上正确使用这个类型的是下列哪个操作()。

A.Sub Command1_click() Dimstudent As Stutype With student .ino=12 .strname=smith .strsex=男 .smark=89 End With End Sub

B.Sub Command1_Click() Dim student As Stutype With student .ino=12 .strname="smith" .strsex="男" .smark=89 End With End Sub

C.Sub Command1_Click() Dim student As Stutype With Stutype .ino=12 .strname="smith" .strsex="男" .smark=89 End With End Sub

D.Sub Command1_click() Dim student As Stutype With student .ino=12 .strname="smith" .strsex="男" .smark=89 End student End Sub

点击查看答案
第4题
设在工程中定义了如下类型: Type stutype ino As Integer strname As String*20 strsex As Strin
g* 1 smark As Single End Type在窗体上正确使用这个类型的是下列哪个操作()。

A.Sub Commandl_Click0 Dim student As Stutype With student .ino = 12 . strname = smith .strsex = .smark = 89 End With End Sub

B.Sub Commandl_Click0 Dim student As Stutype With student .ino = 12 .strname = "smith" .strscx = "男" .smark = 89 End With End Sub

C.Sub Commandl_Click0 Dim student As Stutype With Stutype ino = 12 .strname = "smith" .strsex = "男" .smark = 89 End With End Sub

D.Sub Command1 _Click() Dim student As Stutype With student .ino = 12 .strname = "smith" .strsex = "男" .smark = 89 End student End Sub

点击查看答案
第5题
有如下语句:Type Student Name As String Age As Integer Sex As StringEnd TypeDim Stu As Stud

有如下语句: 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

点击查看答案
第6题
在E盘当前目录文件夹下建立一个名为“Student.txt”的随机文件,要求用InputBox函数输入5个学生的姓
名(StuName)、年级(StuGrade)和年龄(StuAge)。在程序中有以下记录类型和窗体的事件过程,请选择正确的语句完成程序()。 Private Type student StuName As String * 10 StuGrade As String * 10 StuAge As Integer End Type Private Sub Form_Click() Dim s As student Open "c:\student.txt" For Random As #1 Len = Len(s) For i = 1 To 1 s.StuName = InputBox("请输入姓名") s.StuGrade = InputBox("请输入年级号") s.StuAge = Val(InputBox("请输入年龄")) Next i Close #1 End Sub

A.Print #1,s

B.Print #1,i

C.Put #1,,s

D.Put #1,,i

点击查看答案
第7题
要建立一个随机文件记录学生的信息,如下定义了学生的记录类型,由学号、姓名、5门课程成绩(百分制)

要建立一个随机文件记录学生的信息,如下定义了学生的记录类型,由学号、姓名、5门课程成绩(百分制)组成,下列的定义正确的是()。

A.Type sru no As Integer name As String score(1 To 5)As Single End Type

B.Type stu no As Integer name As String*10 score()As Single End Type

C.Type stu no As Integer name As String*10 score(1 To 5)As Single End Type

D.Type stu no As Integer name As String score()As Single End Type

点击查看答案
第8题
设在工程中有一个标准模块,其中定义了如下记录类型:Type Books Name As String (10 Te1Num As

设在工程中有一个标准模块,其中定义了如下记录类型:Type Books Name As String (10 Te1Num As String * 20End 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.Te1Num=InputBox("输入学号") Write#1,B.Name,B.Te1Num Close #1End Sub

点击查看答案
第9题
要建立一个学生成绩的随机文件,如下定义了学生的记录类型,由学号、姓名、三门课程成绩(百分制)组成

要建立一个学生成绩的随机文件,如下定义了学生的记录类型,由学号、姓名、三门课程成绩(百分制)组成,下列程序段正确的是

A.Type stud1 no As Integer name As String score (1 To 3) As Single End Type

B.Type stud1 no As Integer name As String * 10 score () As Single End Type

C.Type stud1 no As Integer name As String * 10 score (1 To 3) As Single End Type

D.Type stud1 no As Integer name As String score (1 To 3) As Single End Type

点击查看答案
第10题
假定在窗体(名称为Form1)的代码窗口中定义如下记录类型: Private Type animal animal Name As St

假定在窗体(名称为Form1)的代码窗口中定义如下记录类型:

Private Type animal

animal Name As String * 20

aColor As String * 10

End Type

在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程:

Private Sub Command1 Click()

Dim rec As animal

Open "c:\vb Test.dat"For Random As # 1 Len=Len(reC) rec.animalName="cat"

rec.aColor="White"

Put # 1,,rec

Close # 1

End Sub

则以下叙述中正确的是 ______。

A.记录类型animal不能在Form1中定义,必须在标准模块中定义

B.如果文件c:\vbTest.dat不存在,则Open命令执行失败

C.由于Put命令中没有指明记录号,因此每次都把记录写到文件的末尾

D.语句"Put # 1,,rec"将animal类型的两个数据元素写到文件中

点击查看答案
退出 登录/注册
发送账号至手机
密码将被重置
获取验证码
发送
温馨提示
该问题答案仅针对搜题卡用户开放,请点击购买搜题卡。
马上购买搜题卡
我已购买搜题卡, 登录账号 继续查看答案
重置密码
确认修改