找考题网-背景图
未分类题

假定有以下两个过程: Sub S1(ByVal x As Integer, ByVal y As Integer) Dim t As Integer t=K x=y y=t End Sub Sub S2(x As Integer, y As Integer) Dim t As Integer t=K x=y y=t End Sub 则以下说法中正确的是 ( )
D.用过程S1和S2都不能实现交换两个变量值的操作

A.用过程S1可以实现交换两个变量值的操作,S2不能实现
B.用过程S2可以实现交换两个变量值的操作,S1不能实现
C.用过程S1和S2都可以实现交换两个变量值的操作

【参考答案】

B
解析:本题主要是对调用方式的考查。在S1中实现的是传值调用,故不影响实际参数值。S2过程中实现的是传址调用,影响到实际参数。故用过程S2可以实现两个变量值的操作,而S1不能实现。选项B正确。
热门试题

未分类题Health implies. more than physical fitness. It also implies mental and emotional wellbeing. An angry, frustrated, emotionally (1)_____ person in good physical condition is not (2)_____ healthy. Mental health, therefore, has much to do (3)_____ how a person copes with the world as it exists. Many of the factors that (4)_____ physical health also affect mental and emotional well-being.Having a good self-image means that people have positive (5)_____ pictures and good positive feelings about themselves, about what they are capable (6)_____, and about the roles they play. People with good self-images like themselves, and they are (7)_____ like others. Having a good self- image is based (8)_____ a realistic (9)_____ of one's own worth and value and capabilities.Stress is an unavoidable, necessary, and potentially healthful (10)_____ of our society. People of all ages (11)_____ stress. Children begin to (12)_____ stress during prenatal development and during childbirth. Examples of stress-inducing (13)_____ in the life of a young person are death of a pet, pressure to (14)_____ academically, the divorce of parents, or joining a new youth group. The different ways in which individuals (15)_____ to stress may bring healthful or unhealthy results. One person experiencing a great deal of stress may function exceptionally well (16)_____ another may be unable to function at all. If stressful situations are continually encountered, the individual's physical, social, and mental health are eventually affecteD.Satisfying social relations are vital to (17)_____ mental and emotional health. It is believed that in order to (18)_____, develop, and maintain effective and fulfilling social relationships people must (19)_____ the ability to know and trust each other, understand each other, influence, and help each other. They must also be capable of (20)_____ conflicts in a constructive way.A.unstableB.unsureC.impreciseD.impractical

A.B.
C.
D.
A.unstable
B.unsure
C.imprecise