题目内容

以下程序企图把从终端输入的字符输出到名为abc.txt的文件中,直到从终端读入字符#号时结束输入和输出操作,但程序有错。 #include <stdio.h> main( ) { FILE *fout; char ch; fout=fopen(’’abc.txt’’,’’w’’); ch=fgetc(stdin); while(ch!=’’#’’) { fputc(ch,fout); ch =fgetc(stdin); } fclose(fout); } 出错的原因是( )。

A. 函数fopen调用形式有误
B. 输入文件没有关闭
C. 函数fgetc调用形式有误
D. 文件指针stdin没有定义

查看答案
更多问题

以下程序运行后的输出结果是【 】 int a=5; fun(int b) { static int a=10; a+=b++; printf("%d ",a); } main( ) { int c=20; fun(c); a+=c++; printf("%d\n",a); }

Any earthquake that takes place in any area is certainly regarded as a kind of a ______ event.

A. cholesterol
B. charcoal
C. catastrophic
D. chronic

阅读下面短文,从短文后所给各题的四个选项([A]、[B]、[C]和[D])中选出能填入相应空白处的最佳选项。 Some students at the Open University left school 20 years ago. (36) are younger but all must be at least 21 years old. This is one example of (37) the Open University is different (38) all the others. Its students must (39) work fulltime or be at home all day. They do not have to (40) any examinations before they are (41) . This is why the university is called "open". It was started (42) order to help people who (43) having a university education when they were young. The first name (44) the open university was "the University of the Air". The idea was to teach (45) the air, in other (46) , on radios and the television. (47) of the teaching is done like this. The student also receives (48) at one of 283 study centers in the country. He must also (49) three weeks every summer as a (50) student. Tutors and students (51) and study together, (52) in other universities. At the end of the Open University’s first year, the (53) were good; three (54) of four students passed their examinations. (55) they do this every year, they will finish their studies in four or five years.

A. instead
B. because
C. out
D. without

阅读下面的文字,按要求回答问题。西湖雨夜苏轼咏西湖名句:“水光潋滟晴方好,山色空濛雨亦奇”早已脍炙人口。古人所作西湖游记,写雨者亦殊多,然大半为雨朝;雨夕,鲜有写其雨夜者。一九五六年,我于西湖作三日游。一日下午突布云幔,满城皆暗,未几,雨脚东来,若轻纱,若薄雾,罩西子于帘幕之中。但见南北高峰,憧憧浮动;白苏二堤,隐漾若无。少顷雨急,则孤山、湖心亭一带,草痕树影全模糊了。斯时方觉西湖雨景之美,全在清濛淡雅之间。若以拟人法喻之,西湖恰似十七八岁女儿家于幕后含颦,大可人也。此次来杭,正值中雨,蛰伏旅馆中半日,颇感局促。入夜,杭城友人L君邀约夜游,遂擎一雨伞出。时雨阵方敛,转为潇潇,步行至湖滨公园。觅一石凳坐憩。面对雨夜西湖,默不作声,惟闻雨滴击伞,噗噗作响。西湖雨夜,别有一番雅致。湖山楼阁,仿佛被天公泼墨染却,一派漆黑,更不能辨其轮廓。然沿湖半圈灯火,交烁明灭,望似星城。比我往年所写诗句“夜雨秋灯青似萤”,更为壮观了。又过片刻,雨声渐息,周匝天地,绝不似有人迹者。我不免笑问L君:“你不觉得太清静了吗”L君默默良久,方才答道:“此时无声胜有声。”好一个“无声胜有声”!灵机一动,我很快凑成四句:“无声有声,夜雨秋灯。心随何往,数点青萤。”自以为有些哲理意味,当然不敢说是得了禅机。 文中之所以欣赏“西湖雨夜”之景的美在于()。

A. 幽静寂寥,顿悟禅机
B. 空阔旷远,引人遐思
C. 娴静幽雅,令人沉醉
D. 幽寂恬静,物我一体

答案查题题库