问题 填空题

设文件test. txt中原已写入字符串Begin,执行以下程序后,文件中的内容为______。
#include
main()
FILE *fp;
fp=fopen("test.txt","w+");
fputs("test",fp);
fcloset(p);

答案

参考答案:test

解析: fp=fopen(“test.txt”,“w+”)新建一个文件名为“test.txt”的文件,会将原来的“test.txt”覆盖。将“test”写入“test.txt”文件中。所以结果为“test”。

改错题

短文改错

        此题要求改正所给短文中的错误。对标有题号的每一行作出判断:如无错误,在该行下边横线上画一个勾;如有错误(每行只有一个错误),则按下列情况改正:

        此行多一个词:把多余的词用斜线(\)划掉,在该行下边横线上写出该词,并也用斜线划掉。

        此行缺一个词:在缺词处加一个漏字符号,在该行下边横线上写出该加的词。

        此行错一个词:在错的词下划一横线,在该行下边横线上写出改正后的词。

        注意:原行没有错的不要改。

Dear Editor,  

     Recently, my classmates have had a heated discussion

about that we should have optional                                           1.________

courses in high schools. Some students were in favor                2.________

of the optional courses. They say interest is best teacher           3.________

and his spare time will be colorful and meaningful.                    4.________

Students cannot only enlarge their knowledges but also            5.________

improve their abilities. However, others are against the

idea, said that optional courses will take up too                        6.________

much time as well as energy. In addition to, some optional        7.________

courses have something to do with the                                     8.________

College Entrance Examination. They are afraid they'll fall

behind their classmates if they will take the optional                  9.________

courses. I'd like to take one or two of the optional

courses, which, I think, will certain benefit me a lot.                 10.________

                                                Yours truly,

                                                   Li Hua

单项选择题