问题 单项选择题

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

B.Private Sub Command1_Click()
Dim B As Books
Open"c:\Person.txt"For lnput As #1
B.Name=InputBox(“输入姓名”)

C.Private Sub Command1_Click()
Dim B As Books
Open"c:\Person.txt"For Output As #1
B.Name=In

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

答案

参考答案:A

解析:[评析] A选项正确。
B选项向文件中输出内容,打开方式应当为For output。
C选项记录变量不可以对元素整体输入输出。
D选项记录变量的输入和输出都必须指明到记录元素。格式为;记录变量元素名。

阅读理解

Every American family has its own traditions on Thanksgiving Day, and mine is no difference. Once the national holiday arrives, my mom rises early to make the meal. She puts a turkey in the oven, chops carrots and bakes pies. I’m sorry to say that the men in the family – my dad, my younger brother and myself – rarely pitch in to help. Our job is to wash the mountain of dirty dishes after the meal is over.

Around 2 pm every Thanksgiving Day, family members seat themselves around the kitchen table. Plates of turkey, vegetables, salad, rolls and pies cover it. At this point, we can hardly keep ourselves from drooling (流口水) all over our fancy clothes, but it’s not yet time to eat.

First, we must bow our heads, close our eyes and say a prayer of thanks aloud to God for giving us everything we have. Under normal circumstances, I would have no problem making a list of things I am thankful for. I grew up in a loving family. My parents, who aren’t wealthy, took out loans to help me pay for university.

But, the funny thing is, every time I sit down for Thanksgiving dinner and try to say a prayer of thanks, my mind usually goes blank. I think it has something to do with my growling (咕咕叫) stomach and all of that food sitting right there under my nose.

Eventually, though, we all finish our short prayers and dig in. To be sure, the day includes other highlights – visiting with family and watching football. But usually around 6 pm we are all ourselves stuffed like turkeys and thankful to have a nice warm bed to sleep in.

小题1:The purpose of the text is to ________.

A.tell what the family do for Thanksgiving Day

B.tell how the family spends Thanksgiving Day

C.introduce foods served on Thanksgiving Day

D.introduce the American Thanksgiving Day小题2:On Thanksgiving Day the author’s family do the following except ________.

A.watching a movie

B.making visits

C.having a big meal

D.watching football小题3:Why does the author’s mind usually “go blank” when saying a prayer of thanks?

A.He is too thankful to say a word.

B.His mind is on the food before him.

C.He feels too excited to speak.

D.He is shy to speak in public.小题4:The underlined phrase “dig in” in the last paragraph is closest in meaning to “________”.

A.chat with others

B.make a hole

C.mix things up

D.start eating

问答题 简答题