问题 单项选择题

有以下程序
main()
int m=3 , n=4 , x ;
x=-m++;
x=x+8/++n ;
printf("%d\n",x);

程序运行后的输出结果是______。

A) 3 B) 5 C) -1 D) -2

答案

参考答案:D

解析: 在C语言中,++有前缀和后缀两种形式,它们的区别在于其表达式的值不同,前缀形式表达式的值为增加1后的值,而后缀表达式为增加1之前的值。本题中,首先执行x=-m++,此时x的值变成了-3,接着再执行x=x+8/++n,此时就变成了x=-3+8/5=-2。

完形填空

 

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

阅读下面短文,掌握其大意,然后从36-55各题所给的四个选项中选出最佳选项。

Walking down the street the other day, I happened to notice a small purse on the sidewalk. I __36__ it up and opened it to see __37__ I could find out the owner’s name. There was __38__ inside it except some change and an old photo --- a picture of a woman and a young girl about twelve years old, __39__ looked like __40__ woman’s daughter. I put the photo back and took the purse to the police station, __41__ I handed it to the desk sergeant. Before I __42__, the sergeant took down my name and address in case the owner __43__ want to write and thank me.

That evening, I went to have __44__ with my aunt and uncle. A young woman had also been invited so that there would be __45__ people at the table. Her face was __46__. I was quite sure that we had __47__ before, but I could not remember where I had seen her. During the course of conversation, however, the young woman __48__ to mention (说起) that she had lost a purse with some change and an old photo, and she had the photo __49__ in her childhood. All at once I __50__ where I had seen her. She was the young girl in the photo, __51__ she was now much older. She was very __52__, of course, when I was able to tell her all about the __53__. My uncle insisted on going to the police station immediately __54__ the purse. As the police sergeant handed it over, he said that it was an amusing coincidence (巧合) that I had not only found the purse but also the __55__ who had lost it.

36. A. took         B. picked      C. brought       D. lifted

37. A. when        B. what        C. how         D. if

38. A. everything    B. anything     C. something    D. nothing

39. A. who         B. that         C. which        D. whom

40. A. a           B. an          C. the          D. one

41. A. where       B. when        C. which      D. what

42. A. arrived      B. left          C. went        D. turned

43. A. should       B. could        C. must        D. might

44. A. dinner       B. talk         C. party        D. meeting

45. A. two         B. three         C. four         D. five

46. A. familiar      B. same        C. famous      D. similar

47. A. seen         B. met          C. looked      D. talked

48. A. meant        B. happened     C. wanted      D. decided

49. A. found        B. made        C. lost          D. taken

50. A. wondered     B. believed     C. realized       D. regretted

51. A. unless        B. since        C. because      D. although

52. A. worried       B. sad         C. exciting      D. surprised

53. A. woman       B. purse        C. policeman    D. girl

54. A. for          B. with         C. by           D. to

55. A. man         B. citizen       C. person        D. Guest

多项选择题