题目内容

在C盘当前文件夹下有一个已建立好的顺序文件Alph.txt,文件内容为只含有字母的一个字符串(有双引号界定符)。单击窗体,打开Alph.txt文件,读取字符串并显示在文本框Text1中,然后调用StrSort过程将此字符串按ASCII码的顺序重新排列并显示在文本框Text2中,最后将重新排列的字符串存入Alp().txt文件中(无双引号界定符)。请选择横线处合适的语句( )。 Private Sub Form Load() Dim Strln As String, StrOut AS String Open "C: \Alph.txt" For Input As#1 ______ Close Text1.Text=StrIn ______ Text2.Text=StrOut Open "C: \AIpO.txt" For Output As#2 ______ Close Fnd Sub Private Function StrSort(s As String)As String Dim sArr()As String *1, j As Integer, J As Integer, n As Integer DimtAS String*1 n=Len(s) ReDim sArr(n) For i=1 To n sArr(i)=Mid(s,i,1) Next i For i=1 To n. 1 For j=i+1 To n If sArr(i)>sArrj Then t=sArr(i):sArr(i)=sArr(i):sArr(j)=t EndIf Next i, i For i=1 To n StrSort=StrSort&sArr(i) Nexti End Function

A. Input#1, Strln Strln Print#2, StrOut
B. Input#1, Strln StrSort(Strin)Print#2, StrOut
C. Input#2, Strln StrSort(Strln)Print#1, SttOut
D. Print#1, Strln StrSort(Strin)Input#2, StrOut

查看答案
更多问题

So many people use the cell phones so frequently every day. But (1) little is certain about the health effects of its use. Manufacturers (2) that cell phones meet government standards for safe radio-frequency radiation emission, but enough studies are beginning to document a possible (3) in rare brain tumors (肿瘤), headaches and behavioral disorders in children to cause concern. So far, the evidence isn’t (4) on whether the use of cell phones (5) to any increased risk of cancer. In a new trial, researchers asked 47 volunteers to (6) in a project to measure glucose (葡萄糖) consumption in the brain by scanning the brain to see how cells use energy. For both 50-minute scans, the volunteers had a cell phone (7) to each ear. During the first scan, the devices were turned off, but for the second scan, the phone on the right ear was (8) on and received a recorded-message call, although the volume was muted (消音) so the noise wouldn’t bias the results. The results of the second scan showed that the (9) of the brain nearest to the device had higher rates of glucose consumption than the rest of the brain. The study shows that cell phones can change brain activity, and (10) a whole new avenue for scientific inquiry, though it doesn’t say anything about whether cell-phone radiation can cause cancer.A.conclusiveB.contributesC.deriveD.expressesE.fixedF.immenselyG.increaseH.maintainI.missionJ.participateK.particularL.providesM.regionsN.surprisinglyO.switched (2)处应填()

Walking, if you do it vigorously enough, is the overall best exercise for regular physical activity. It requires no equipment, everyone knows how to do it and it carries the (1) risk of injury. The human body is designed to walk. You can walk in parks or along a river or in your neighborhood. To get (2) benefit from walking, aim for 45 minutes a day, an average of five days a week.Strength training is another important (3) of physical activity. Its purpose is to build and (4) bone and muscle mass, both of which shrink with age. In general, you will want to do strength training two or three days a week, (5) recovery days between sessions.Finally, flexibility and balance training are (6) important as the body ages. Aches and pains are high on the list of complaints in old age. The result of constant muscle tension and stiffness of joints, many of them are (7) , and simple flexibility training can (8) these by making muscles stronger and keeping joints lubricated (润滑). Some of this you do whenever you stretch. If you watch dogs and cats, you’ll get an idea of how natural it is. The general (9) is simple: whenever the body has been in one position for a while, it is good to (10) stretch it in an opposite position.A.allowingB.avoidableC.brieflyD.componentE.determinedF.helpingG.increasinglyH.lowestI.maintainJ.maximumK.preventL.principleM.provokeN.seriouslyO.topic (2)处应填()

窗体上有一个列表框和一个文本框,编写下列两个事件过程: Private Sub Form. Load() List1.AddItem "北京" List1. AddItem "天津" List1. AddItem "上海" Text1. Text="" End Sub Private Sub List1. Click() Print Text1. Text+List1. Text End Sub 程序运行后,在文本框中输入“中国”,然后单击列表框中的“北京”,则输出结果是( )。

A. 中国北京
B. 中国天津
C. 中国上海
D. 北京中国

下列程序要求用户输入一个年份,并能够判断用户输入的年份是否是闰年,横线处应填( )。 Sub EnSure() Dim year As Integer year=Val(InputBox("请输入年份:")) If(year Mod 4=0______year Mod 100<>0)______(year Mod 400=0)Then Print"您输入的是闰年" Else Print"不是闰年,是普通年份" End If End Sub

And And
B. And Or
C. Or Or
D. Or Or

答案查题题库