假定在工程文件中有一个标准模块,其中定义了如下记录类型: 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 SubB.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 SubC.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 SubD.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

假定在工程文件中有一个标准模块,其中定义了如下记录类型: 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


相关考题:

假定在工程文件中有一个标准模块,其中定义了如下记录类型:Type BooksName As String*10TelNuin As String*20End Type要求在执行事件过程Command1_Click时,在顺序文件Person.txt中写入一条记录。将以下程序补充完整。Private Sub Command1_Clickk()DimB As Booksopen"c:\person.txt"For output As 1B.Name=InputBox("请输入姓名")B.TelNum=InputBox("请输入电话号码")write 1,______close 1End Sub

假定在窗体(名称为Form1) 的代码窗口中定义如下记录类型:Private Type animalanimalName As String *20aColor As String *10End Type在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程:Private Sub Command1_Click()Dim rec As animalOpen "c:\vbTest.dat"For Random As #1 Len=Len(reC.rec.animalName= "Cat"rec.aColor= "White"Put #1,,recClose #1End Sub则以下叙述中正确的是( )。A.记录类型animal不能在Form1中定义,必须在标准模块中定义B.如果文件c:\vbTest.dat不存在,则Open命令执行失败C.由于Put命令中没有指明记录号,因此每次都把记录写在文件的末尾D.语句"Put #1,,rec"将animal类型的两个数据元素写到文件中

要建立一个学生成绩的随机文件,如下定义了学生的记录类型,由学号、姓名、三门课 程成绩(百分制)组成,下列程序段正确的是( )。A.Typepestudl no As Integer name As String score(1 To 3)As Single End TypeB.Typestudl no As Integer no As Integer name As String*10 score()As Single End TypeC.Typestudl no As Integer name As String*10 score(1 To 3)As Single End TypeD.Typestudl no As Integer name As String score(1 To 3)As Single End 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="张红"

( 35 )设在工程文件中有一个标准模块,其中定义了如下记录类型:Type BooksName As String * 10TelNum As String * 20End Type在窗体上画一个名为 Command1 的命令按钮,要求当执行事件过程 Command1_Click 时,在顺序文件Person.txt 中写入一条 Books 类型的记录。下列能够完成该操作的事件过程是A ) Private Sub Command1_Click()Dim B As BooksOpen “ Person.txt ” For Output As #`1B.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 SubC ) Private Sub Command1_Click()Dim B As BooksOpen “ Person.txt ” For Output As #`1B.Name=InputBox( “ 输入姓名 ” )B.TelNum=InputBox( “ 输入电话号码 ” )Write #1,BClose #1End SubD ) Private Sub Command1_Click()Open “ Person.txt ” For input As #`1Name=InputBox( “ 输入姓名 ” )TelNum=InputBox( “ 输入电话号码 ” )Print #1, Name, TelNumClose #1End Sub

假定在工程文件中有一个标准模块,其中定义了如下记录类型 Type Books NalTle As String*10 TelNum As String*20 End Type 要求当执行事件过程ComlBandl_Click时,在顺序文件Person.txt中写入一条记录。下列能够完成该操作的事件过程是( )。A.Ptivate Sub Commandl_Click() DimB As Books Open"c:\Person.txt"For Output As#1B.Name=InputBox(“输入姓名”)C.Private Sub Conullandl_CHCk() DimBAs Books Open"c:\Person.txt"For Ouputut As#1 Name=hputBox(“输入姓名”) Temum=InputBox(“输入电话号码”) Whte#1,B Close#1 End Sub D.Privam Sub Commnandl_Click() DimBAsBook Open"C:\Person.tx

设有如下的用户定义类型: Type Student number As String name As string age As Integer End Type 则以下正确引用该类型成员的代码是______。A. Student name="李明”B.Dim s As Student s.name="李明"C.Dim s As Type Student s.name="李明"D.Dim s As Type s.name="李明"

(12)要建立一个随机文件记录学生的信息,下列定义了学生的记录类型,由学号、姓名、五门课程成绩(百分制)组成,下列的定义正确的是。A.Type stu no As Integer name As String score(1 To 5)As Single End Type B.Type stuno As Integename As String*10score()As SingleEnd TypeC.Type stu no As Integer name As String*10 score(1 To 5)As Single End Type D.Type stuno As Integername As Stringscore()As SingleEnd Type

设在工程中有一个标准模块,其中定义了如下记录类型: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

假定在工程文件中有一个标准模块,其中定义了如下记录类型Type BooksName As String * 10TelNum As String * 20End Type要求当执行事件过程Command1_Click时,在顺序文件Person.txt中写入一条记录。下列能够完成该操作的事件过程是( )。A.Private Sub Command1_Click()Dim B As BooksOpen "c:\Person.txt" For Output As #1B.Name = InputBox("输入姓名")B.TelNum = InputBox("输入电话号码")Write #1, B.Name, B.TelNumClose #1End SubB.Private Sub Command1_Click()Dim B As BooksOpen "c:\Person.txt" For Input As #1B.Name = InputBox("输入姓名")B.TelNum = InputBox("输入电话号码")Print #1, B.Name, B.TelNumClose #1End SubC.Private Sub Command1_Click()Dim B As BooksOpen "c:\Person.txt" For Output As #1Name = InputBox("输入姓名")TelNum = InputBox("输入电话号码")Write #1, BClose #1End SubD.Private Sub Command1_Click()Dim B As BookOpen "c:\Person.txt" For Input As #1Name = InputBox("输入姓名")TelNum = InputBox("输入电话号码")Print #1, B.Name, B.TelNumClose #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类型的两个数据元素写到文件中

设有如下的记录类型: TypeStudent number As String name AS String age As Integer End Type 则正确引用该记录类型变量的代码是( )。A.Student.name="张红"B.Dim s As Student s.name="张红"C.Dim s As Type Student s.name="张红"D.Dim s As Type s.name="张红"

以下能正确定义数据类型TelBook的代码是_________。A.Type TelBook Name As String*10 TelNum As Integer End TypeB.Type TelBook Name As String*10 TelNum As Integer End TelBookC.Type TelBook Name String*10 TelNum Integer End Type TelBookD.TypedefTelBook NameString*10 TelNum Integer End Type

以下叙述中错误的是 ______。A.一个工程中可以包含多个窗体文件B.在一个窗体文件中用Private定义的通用过程能被其他窗体调用C.在设计Visual Basic程序时,窗体、标准模块、类模块等需要分别保存为不同类型的磁盘文件D.全局变量必须在标准模块中定义

以下能正确定义数据类型TelBook的代码是 ______。A.Type TelBook Name As String*10 TelNum As Integer End TypeB.Type TelBook Name As String*10 TelNun As Integer End TelBookC.Type TelBook Name String*10 TelNum Integer End Type TelBookD.TypedefTelBook Name String*10 TelNum Integer End Type

设在工程中有一个标准模块,其中定义了如下记录类型: TyPe Record ID A3 Integer Name As String*20 End TyPe 在窗体中添加一个名为Command1的命令按钮,假设d:\F1.dat文件中含有5个用户自定义类型的记录。要求当执行事件过程Command1_Click时,随机访问该文件,并把文件中的第4条记录读出。下列能够完成该操作的程序段是A.Private Sub Command1_Click( ) Dim MyRecord As Record,Position Open"d:\F1.dat"For Random As#1 Len=Len(My RecorD)Position=4 Get#1,Position,Myrecord Close #1 End SubB.Private Sub Command1_Click( ) Dim MyRecord As Record,Position Open"d:\F1.dat"For Random As #1 Len=Len(MyRecorD)Position=4 Put #1,Position,MyRecord Close#1 End SubC.Private Sub Command1_Click( ) Dim MyRecord As Record,Position Open"d:\F1.dar"For OutPut As #1 Len=Len(My RecorD0Position=4 Get #1,Position,MyRecord Close#1 End SubD.Private Sub Command1_Click( ) Dim MyRecord As record,Position Open"d:\F1.dat"For lnput As #1 Len=Len(MyRecorD)Position=4 Get #1,Position,MyRecord Close#1 End Sub

要建立一个随机文件记录学生的信息,如下定义了学生的记录类型,由学号、姓名、5门课程成绩(百分制)组成,下列的定义正确的是( )。A.Type sru no As Integer name As String score(1 To 5)As Single End TypeB.Type stu no As Integer name As String*10 score()As Single End TypeC.Type stu no As Integer name As String*10 score(1 To 5)As Single End TypeD.Type stu no As Integer name As String score()As Single End Type

在窗体上有一个名称为Command1的命令按钮,并编写有如下事件过程:记录类型定义如下:下列叙述中正确的是( )。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 要求当执行事件过程Commandl_Click时,在顺序文件Person.txt中写入一条记录。下列能够完成该操作的事件过程是:A. Prirate Sub Commandl Click() Dim B As Books Open"C:\Person.txt"For Output As #1B.Name=InputBox("输入姓名")B.TelNum=InputBox("输入电话号码") Write #1,B.Name,B.TelNum Close #1 End SubB.Pdrate Sub Commandl Cliok() Dim B As Books Open"c:\Person.txt"For Input As #1B.Name=InputBox("输入姓名")B.TeINum=InputBox("输入电话号码") Print #1,B.Name,B.TelNum Close #1 End SubC.Private Sub Commandl Click() Dim B As Books Open"c:\Person.txt"For Output As #1 Name=InputBox("输入姓名") TelNunl=InputBox("输入电话号码") Write #1,B Close #1 End SubD.Private Sub Commandl Click() Dim B As Books Open"c:\Person.txt"For Input As #1 Name=InputBox("输入姓名") Temum=InputBox("输入电话号码") Write #1,B.Name,B.TelNuin Close #1 End Sub

下列数据类型定义中,正确的是A.Type Student Num As Long Name As String End TypeB.Type Student Num As Integer Name As String * 10 End TypeC.Private Type Num As Long Score As Single End TypeD.Private Type Student Name As String Score(10)As String * 10 End Type

要建立一个随机文件记录学生的信息,下列定义了学生的记录类型,由学号、姓名、五门课程成绩(百分制)组成,下列的定义正确的是( )。A.Type stu no As Integer name As String score(1 To 5)As Single End TypeB.Type stu no As Integer name As String*10 score()As Single End TypeC.Type stu no As Integer name As String*10 score(1 To 5)As Single End TypeD.Type stu no As Integer name As String score()As Single End Type

设有如下的记录类型: Type Student number As String name As String age As Integer End Type 则正确引用该记录类型变量的代码是______。A.StUdent.name=""B.Dim s As StUdent s.name="张红"C.Dim s As Type Student s.name="张红"D.Dim s As Type s.name="张红"

由如下程序: Type Student Num As Integer Name As String * 13 End Type Dim stu(30)As Student 该程序段定义了两个程序成分,它们分别是 ______。A.记录类型和记录数组B.记录类型和记录变量C.显示类型和记录数组D.记录变量和记录数组

有如下程序: Private Type stu X As String Y As Integer End Type Private Sub Command1 Click( ) Dim a As stu X="ABCD" Y=12345 Print a End Sub 程序运行时出现错误,错误的原因是( )。A.Type定义语句没有放在标准模块中B.变量声明语句有错C.赋值语句不对D.输出语句Print不对

设在工程文件中有一个标准模块,其中定义了下列记录类型:Type BooksName As String*10TelNum As String*20End,Type在窗体上画一个名为Command1的命令按钮,要求当执行事件过程Command1 Click 时,在顺序文件Person.txt中写入一条Books类型的记录。下列能够完成该操作的事件过程是( )。A.Private Sub Command1 Click( )Dim B AS BooksOpenPerson txtFor Output As#1Name=InputBox(”输入姓名”)relNum=lnputBox(”输入电话号码”)Wlite#1 B Name,B TelNumCh,se#1End SubB.Private Sub Command1 Click( )Dim B AS BooksOpenPerson txtFor Input As#1Name=InputBox(输入姓名)TelNum=InputBox(输入电话号码)Print#1,B.Name,B.TelNamClose#1End SubC.Private Sub Command1 Click( )Dim BAS BooksOpenPerson txtFor Output As#1Name=InputBox(输入姓名)TelNum=InputBox(输入电话号码)Write#1,BClose#1End SubD.Private Sub Commandl Click( )OpenPerson txtFor Input As#1Name=lnputBox(输入姓名)TelNum=lnputBox(输入电话号码)Prim#1 Name TelNumClose#1End Sub

以下能正确定义数据类型TelBook的代码是( )。A.Type TelBook Name As String*10 TelNum As Integer End TypeB.Type TelBook Name As String*10 TelNum As Integer End TelBookC.Type TelBook Name String*10 TelNum Integer. EndType TelBookD.Typedef TelBook Name String*10 TelNum Integer End Type

以下关于窗体叙述中错误的是()。A、一个工程中可以包含多个窗体文件B、在一个窗体文件中用Private定义的通用过程能被其他窗体调用C、在设计VB程序时,窗体、标准模块、类模块等需要分别保存为不同类型的磁盘文件D、全局变量必须在标准模块中定义

下面定义PL/SQL记录的语法正确的是()。A、TYPE 记录类型名 IS RECORDB、TYPE 记录类型名 RECORDC、RECORD 记录类型名D、TYPE RECORD 记录类型名