问题 单项选择题

下述程序的输出结果是( )。
# include <stdio.h>
int fun( int

A.

答案

参考答案:C

解析: 本题主函数中的for循环会循环两次,即输出连续两次调用fun(2)的返回值。在fun()函数中定义了一个静态变量c,第一次调用fun()时c被初始化为3,然后自增为4,最后输出a+b+c为2+1+4=7。由于静态变量的生存周期为整个程序执行周期,所以第二次调用fun()时c的值为4,然后自增为5,故最后输出a+b+c为2+1+5=8。所以程序的输出结果是78,应该选择C。

选择题
完形填空

第二节完型填空(共20小题;每小题1.5分,满分30分)

阅读下面短文,掌握其大意,然后从36—55各题所给的四个选项(A、B、C和D)中,选出最佳选项。

When I was about 12, I suddenly developed a great passion (strong feeling) for writing poetry. I gave up all my other hobbies, such as 36 stamps, and spent all my 37  time reading poetry and writing it. This habit of writing poetry on every possible time soon got me 38  trouble at school. If a lesson didn’t interest me, I 39 take out my notebook and start 40  poems in class. Of course I 41 this very cautiously, but it was not 42 I got caught. One day while I was 43 writing a poem during a geography lesson, I looked up to 44 the teacher standing over me, fuming with anger because I was not 45 attention. He tore the poem up, with a 46 not to waste time in his lesson.

47 I felt certain that I had written a good poem , 48 that evening I wrote it out again from 49.Not long after, I read 50 a poetry contest and I decided to send in my poem. Weeks later, long after I had given up 51, I got a letter informing me that I had won first 52.Everyone at school was very surprised, 53 the geography teacher, who 54 me more carefully than ever. He 55 that I not write poetry in his class!

36.A.gathering           B.collecting     C.keeping      D.picking

37.A.spare        B.important      C.extra          D.other

38.A.with          B.to             C.into         D.on

39.A.might         B.ought to      C.should      D.would

40.A.writing      B.reading        C.reciting        D.enjoying

41.A.made          B.got           C.opened        D.did

42.A.long ago      B.long before    C.soon after     D.soon before

43.A.happy       B.angry        C.busy         D.sad

44.A.find         B.warn        C.ask          D.answer

45.A.calling             B.devoting     C.giving         D.paying

46.A.notice       B.look        C.warning      D.word

47.A.At the same         B.All the same  C.At the time   D.The same as

48.A.so           B.and          C.as            D.since

49.A.brain         B.memory            C.mind          D.reciting

50.A.through      B.courage      C.hope         D.wish

52.A.victory       B.position      C.prize         D.gift

53.A.expect        B.besides        C.as well as     D.especially

54.A.guarded      B.watched      C.observed      D.inspected

55.A.suggested     B.requested     C.promised      D.insisted