问题 问答题

[说明2]

在C函数2中,reverse(unsigned int n)的功能是求出并返回n的反序数。例如,1234的反序数是4321,其求解过程如下:

(1)由1234除以10得到商123和余数4,0乘以10再加上4得到4;

(2)由123除以10得到商12和余数3,4乘以10再加上3得到43;

(3)由12除以10得到商1和余数2,43乘以10再加上2得到432;

(4)由1除以10得到商0和余数1,432乘以10再加上1得到4321。

[C函数2]

unsigned int reverse(unsigned int n)

{

unsigned int result=0;

while( (1) ){

result=result *10+n%10;

n= (2) ;

}

return result;

}

用567,1234,56781234,62354879643分别作为实参调用函数reverse,对应的返回值分别为765,4321,43218765,1357400630。请说明以62354879643作为实参调用函数reverse时返回结果出错的原因。

答案

参考答案:

运算结果溢出(或超出范围,或其他含义相近的描述)。

解析:

本问题考查溢出问题。

由于程序语言提供的基本数据类型都有其表示范围的限制,因此在运算过程中需要注意是否发生溢出。通过分析,上面的运算过程并没有问题,而且前三个数据的处理结果都是正确的,因此最后一个数据出错的原因是其超出整型的表示范围造成的。

不定项选择题
阅读理解

     No poem should ever be discussed or "analyzed", until it has been read aloud by someone, teacher

or student. Better still, perhaps, is the practice of reading it twice, once at the beginning of the discussion

and once at the end, so the sound of the poem is the last thing onehears of it.

     All discussions of poetry are, in fact, preparations for reading it aloud, and the reading of the poem is,

finally, the most telling "interpretation(解释)" of it, suggesting tone, rhythm, and meaning all at once.

Hearing a poet read the work in his or her own voice, on records or on film, is obviously a special reward. But even those aids to teaching can not replace the student and teacher reading it or, best of all, reciting

(背诵)it.

     I have come to think, in fact, that time spent reading a poem aloud is much more important than

"analyzing" it, if there isn't time for both. I think one of our goals as teachers of English is to have students

love poetry. Poetry is "a criticism of life", and "a heightening (提升) of life". It is "an approach to the truth

of feeling", and it "can save your life". It also deserves a place in the teaching of language and literature

more central than it presently occupies.

     I am not saying that every English teacher must teach poetry. Those who don't like it should not be

forced to put that dislike on anyone else. But those, who do teach poetry must keep in mind a few things

about its essential nature, about its sound as well as its sense, and they must make room in the classroom

for hearing poetry as well as thinking about it.

1. What is the better way to have a better understanding of a poem?

A. Discussing it with others.

B. Practising reading it aloud.

C. Hearing the poet read out.

D. Analyzing it by oneself.

2. According to the author, one of the purposes of teaching English is getting students        

A. to like poetry                                

B. to criticize life

C. to enjoy life                                    

D. to teach poetry

3. The underlined word "make room "( in the last paragraph) probably means ____.

A. to build a booth

B. to provide equipment

C. to leave a certain amount of time

D. to set aside enough space

4. The passage is mainly about _______.

A. teaching poetry                              

B. discussing poetry

C. reading a poem                              

D. reciting a poem