问题 单项选择题

设有语句 Open"c:\Test.Dat" ForOutput As#1 则以下错误的叙述是_________。

A.该语句打开C盘根目录下一个已经存在的文件TesDat

B.该语句在C盘根目录下建立一个名为TesDat的文件

C.该语句建立的文件的文件号为1

D.执行该语句后,就可以通过Print#语句向文件TesDat中写入信息

答案

参考答案:A

解析:[评析] 当以顺序型访问打开一个文件时,可执行以下操作:从文件输入字符(Input)向文件输出字符(Output)把字符加到文件(Append)要顺序型访问打开一个文件,Open语句使用以下语法: Open pathname For [Input|Output|Append]As filenumber[Len=buffersize]当打开顺序文件作为Input时,该文件必须已经存在,否则,会产生一个错误。然而,当打开一个不存在的文件作为Output或Append时,Open语句首先创建该文件,然后再打开它。当在文件与程序之间拷贝数据时,选项Len参数指定缓冲区的字符数。在打开一个文件Input、Output或Append以后,在为其他类型的操作重新打开它之前必须先使用Close语句关闭它。

解答题
单项选择题

Vienna was one of the music centers of Europe during the classical period, and Haydn, Mozart, and Beethoven were all active there. As the (1) of the Holy Roman Empire (which included parts of present-day Austria, Germany, Italy, Hungary, Czech and Slovakia), it was a (2) cultural and commercial center (3) a cosmopolitan character. Its population of almost 250,000 (in 1800) made Vienna the fourth largest city in Europe. All three (4) masters were born elsewhere, but they were (5) to Vienna to study and to seek (6) . In Vienna, Haydn and Mozart became close friends and influenced each other’s musical (7) . Beethoven traveled to Vienna at sixteen to play for Mozart; at twenty-two, he returned to study with Haydn.

Aristocrats from all over the Empire spent the winter in Vienna, sometimes bringing their private (8) . Music was an important part of court life, and a good orchestra was a (9) of prestige. Many of the nobility were excellent musicians.

Much music was heard in (10) concerts where aristocrats and wealthy commoners played (11) professional musicians. Mozart and Beethoven often earned money by performing in these intimate concerts. The nobility (12) hired servants who could (13) as musicians. An advertisement in the Vienna Gazette of 1789 (14) : " Wanted, for a house of the gentry, a manservant who knows how to play the violin well. "

In Vienna there was also (15) music, light and popular in (16) . Small street bands of wind and string players played at garden parties or under the windows of people (17) to throw (18) money. Haydn and Mozart wrote many outdoor entertainment (19) , (20) they called divertimentos or serenades. Vienna’s great love of music and its enthusiastic demand for new works made it the chosen city of Haydn, Mozart and Beethoven.

8()

A.theatre

B.orchestra

C.court

D.troupe