问题 单项选择题

在窗体上画一个名称为Command1的命令按钮和一个名称为Text1的文本框,然后编写如下程序:
Private Sub Command1_Click()
Dim x, Y, z As Integer
x=5
y=7
z=0
Text1. Text=""
Call P1(x, y, z)
Text1. Text=Str(z)
End Sub
Sub P1(ByVal a As Integer, ByVal b As Integer, c As Integer)
c=a+b
End Sub
程序运行后,单击命令按钮,则在文本框中显示的内容是______。

A.0

B.12

C.Str(z)

D.没有显示

答案

参考答案:B

解析:

[分析]: 在定义通用过程时,结果形参前面有关键宁ByRef,则默认为该参数是按传地址方式传送。所以变量a和b是按传值方式传送,变量c按传地址方式传送。数据传送过程为:变量x和y将5和7传送给子函数P1的形参a和b,a+b的值得12赋给变量c,c再回传给实参z,用Str函数转换成字符串赋给文本框的Text属性。

单项选择题
单项选择题


Directions: There are three passages in this part. Each passage is followed by some questions or unfinished statements. For each of them there are four choices marked A, B, C and D. You should decide on the best choice and blacken the corresponding letter on the Answer Sheet.
Passage 1
Questions 1 to 5 are based on the following passage.

Industrial psychology is the application of various psychological techniques to the se-lection and training of industrial workers and to the promotion of efficient working condi-tions and techniques, as well as individual job satisfaction.
The selection of workers for particular jobs is essentially a problem of discovering the special aptitudes and techniques, and personality characteristics needed for the job and of devising tests to determine whether candidates have such aptitudes and characteristics. The development of tests of this kind has long been a field of psychological research. Once the worker is on the job and has been trained, the fundamental aim of the industrial psycholo-gist is to find ways in which a particular job can best be accomplished with a minimum of effort and a maximum of individual satisfaction. The psychologist’s function, therefore, differs from that of the so-called efficiency expert, who places primary emphasis on in-creased production. (76) Psychological techniques used to lessen the effort involved in a given job include a detailed study of the motion required to do the job, the equipment used, and the conditions under which the job is performed. After making such a study, the in-dustrial psychologist often determines that the job in question may be accomplished with less effort by changing the routine motions of the work itself, changing or moving the tools, improving the working conditions, or a combination of several of these methods.
(77) Industrial psychologists have also studied the effects of fatigue on workers to de-termine the length of working time that yields the greatest productivity. In some cases such studies have proven that total production on particular jobs could be increased by re-ducing the number of working hours or by increasing the number of rest periods, or "breaks", during the day. Industrial psychologists may also suggest less direct require-ments for general improvement of job performance, such as establishing a better line of communication between employees and management.

From the first sentence of the passage, we learn that the primary objective of in-dustrial psychology is to study______.

A.working efficiency that leads to the highest output

B.the working skills and the working environment

C.the techniques leading to the highest productivity

D.the use of workers to get the greatest profit