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

在窗体中添加一个命令按钮(其Name属性为Command1),然后编写如下代码: Option Base 1 Private Sub Command1_Click() Dim a a=Array(2,4,6,8) j=1 For i=4 To 1 Step-2 s=s+a(i)*j j=j*10 Next i Print 3 End Sub 运行上面的程序,单击命令按钮,其输出结果是 ( )
D.48

A.2
B.4
C.8

【参考答案】

D
解析:由于语句Option Base 1的存在,则数组下标的下界是1。Array函数是用来给数组元素赋初值的,它要求数组必须是一个变体变量名。题中语句
Dim a
a=Array(2,4,6,8)
是将2赋给a(1),将4赋给a(2),将6赋给。a(3),将8赋给...

(↓↓↓ 点击‘点击查看答案’看完整答案 ↓↓↓)
热门试题

未分类题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