问题 填空题

下面运行程序后,单击命令按钮,输出的结果是【 】。  Private Sub Command1_Click( )   Dim a%(1 To 4),b%(3 To 6),i%,s1#,s2#   For i=1 To 4    a(i) =i   Next i   For i=3 To 6    b(i) =i   Next i   s1=YAS(A)    s2=YAS(B)    Print"s1=";s1;"s2=";s2  End Sub  Function YAS(a( )As Integer)   Dim t#,i%   t=1   For i=LBound(A) To UBound(A)     t=t * a(i)   Next i   YAS=t  End Function

答案

参考答案:s1=24 s2=360

解析:程序首先调用循环语句为数组a、b赋值,其中a(i)=I;b(i)=I,且数组a 的上下界分别为1和4,数组b的上下界分别为3和6;接着将数组a作为参数调用YAS 过程,在YAS过程中,定义了两个变量t及I,I作为循环语句For的变量,它的初始值和终值分别为数组的上下界,循环体为t=t*a(i)即将a(i)的值乘以t,然后再赋给t,当循环结束后,程序返回的就是数组a中的各元素的积;同理程序将数组b作为参数传递给YAS 过程后返回数组b中各元素的积,运行程序结束后,输出结果为:s1=24 s2=360。

单项选择题
单项选择题


Directions: There are 10 blanks in the following passage. For each numbered blank, there are 4 choices marked A, B, C and D.

It is difficult to imagine what life would be like without memory. The meanings of thousands of everyday perceptions, the bases (51) the decisions we make, and the roots of our habits and skills are to be (52) in our past experiences, which are brought into the present (53) memory.
Memory can be defined as the capacity to keep (54) available for later use. It includes not only "remembering" things like arithmetic or historical facts, but also any change in the way an animal typically behaves. Memory is (55) when a rat gives up eating grain because he has sniffed something suspicious in the grain pile. Memory is also involved when a six-year-old child learns to swing a baseball bat.
Memory (56) not only in humans and animals but also in some physical objects and machines. Computers, for example, contain devices for storing data for later use. It is interesting to compare the memory-storage capacity of a computer (57) that of a human being. The in stant-access memory of a large computer may hold up to 100 000 "words" —ready for (58) use. An average American teenager probably recognizes the meanings of about 100 000 words of English. However, this is but a fraction of the total (59) of information which the teenager has stored. Consider, for example, the number of facts and places that the teenager can recognize on sight. The use of words is the basis of the advanced problem-solving intelligence of human beings. A large part of a person’s memory is in terms of words and (60) of words.

A.of

B.to

C.for

D.on