1.在过程定义中用 __表示形参的传值。
a) var
b) byref
c) byval
d) byvalue
2.若已经编写一个sort子过程,在该工程中有多个窗体,为了方便调用sort子程序,应该将子过程放在 __中。
a) 窗体模块
b) 类模块
c) 工程
d) 标准模块
3.下面的子过程语句说明合法的是。
a) sub f1(byval n%()
b) sub f1(n%) as integer
c) function f1%(f1%)
d) function f1(byval n%)
4.要想从子过程调用后返回两个结果,下面子过程语句说明合法的是。
a) sub f(byval n%, byval m%)
b) sub f(n%, byval m%)
c) sub f(byval n%, m%)
d) sub f(n%, m%)
5.下面程序运行的结果是。
private sub command1_click()
dim x%, y%
x = 12 : y = 34
call f(x,y)
print x,y
end sub
public sub f1(n%,byval m%)
n = n mod 10
m = m \ 10
end sub
a) 2 34
b) 12 34
c) 2 3
d) 12 3
6.在窗体上画一个名称为command1的命令按钮,再画两个名称分别为label1、label2的标签,然后编写如下程序**:
private x as integer
private sub command1_click()
x = 5 : y=3
call proc(x,y)
= x = y
end sub
private sub proc(byval a as integer, byval b as integer)
x = a * a
y = b + b
end sub
程序运行后,单击命令按钮,则两个标签中显示的内容分别是___
a)5和3
b)25和3
c)25和6
d)5和6
7.下面程序运行的结果是。
dim a% ,b% ,c%
public sub p1(x%, y%)
dim c%
x = 2 * x : y = y + 2 : c = x + y
end sub
public sub p2(x%, byval y%)
dim c%
x = 2 * x : y = y + 2 : c = x + y
end sub
private sub command1_click()
a = 2 : b = 4 : c = 6
call p1(a, b)
print "a = a ;"b = b ; c = c
call p2(a, b)
print "a = a ;"b = b ; c = c
end sub
a) a = 2 b = 4 c = 6
a = 4 b = 6 c = 10
b) a = 4 b = 6 c = 10
a = 8 b = 8 c = 16
c) a = 4 b = 6 c = 6
a = 8 b = 6 c = 6
d) a = 4 b = 6 c = 14
a = 8 b = 8 c = 6
8.下面程序运行的结果是。
public sub proc(a%()
static i%
do a(i) =a(i) +a(i+1)
i = i + 1
loop while i < 2
end sub
private command1_click()
dim m% ,i% ,x%()
for i = 0 to 4 : x(i) =i + 1 : next i
for i = 1 to 2 : call proc(x())next i
for i = 0 to 4 : print x(i) :next i
end sub
a) 3 4 7 5 6
b) 3 5 7 4 5
c) 2 3 4 4 5
d) 4 5 6 7 8
9.在窗体上画一个名称为command1的命令按钮,然后编写如下程序:
private sub command1_click()
static x as integer
static y as integer
cls y=1
y=y+5
x=5+x
print x,y
end sub
程序运行时,三次单击命令按钮command1后,窗体上显示的结果为___
a)15 16
b)15 6
c)15 15
d)5 6
10. 下列叙述中正确的是___
a)在窗体的form_load事件过程中定义的变量是全局变量
b)局部变量的作用域可以超出所定义的过程
c)在某个sub过程中定义的局部变量可以与其它事件过程中定义的局部变量同名,但其作用域只限于该过程
d)在调用过程时,所有局部变量被系统初始化为0或空字符串
11 .以下关于变量作用域的叙述中,正确的是___
a)窗体中凡被声明为private的变量只能在某个指定的过程中使用
b)全局变量必须在标准模块中声明
c)模块级变量只能用private关键字声明
d)static类型变量的作用域是它所在的窗体或模块文件
12. 单击一次命令按钮之后,下列程序**的执行结果为___
private sub command1_click( )
s=p(1)+p(2)+p(3)+p(4)
print s;
end sub
private function p(n as integer)
static sum
for i= 1 to n
sum=sum+1
next i
p=sum
end function
a)135
b)115
c)35 d)20
13. 可以在窗体模块的通用声明段中声明___
a)全局变量
b)全局常量
c)全局数组
d)全局用户自定义类型
14. 设有如下通用过程:
public function f(x as integer)
dim y as integer
x=20 y=2
f=x*y
end function
在窗体上画一个名称为command1的命令按钮,然后编写如下事件过程:
private sub command1_click()
static x as integer
x=10 y=5
y=f(x)
print x;y
end sub
程序运行后,如果单击命令按钮,则在窗体上显示的内容是___
a)10 5
b)20 5
c)20 40
d)10 40
15. 单击命令按钮时,下列程序**的执行结果为___
dim a as integer,b as integer,c as integer
private sub command1_click( )
a=5:b=8:c=9
call proc1(a,b)
print"a=";a;"b=";b;"c=";c
call proc2(a,b)
print"a=";a;"b=";b;"c=";c
end sub
public sub proc1(x as integer,y as integer)
dim c as integer
x=2*x:y=y+2:c=x+y
end sub
public sub proc2(x as integer,byval y as integer)
dim c as integer
x=2*x:y=y+2:c=x+y
end sub
a)a=20 b=10 c=9
a=10 b=10 c=9
b)a=10 b=10 c=9
a=20 b=10 c=9
c)a=10 b=10 c=9
a=10 b=10 c=9
d)a=20 b=20 c=9
a=20 b=10 c=9
16. 单击命令按钮时,下列程序**的执行结果为___
public sub procl(n as integer,byval m as integer)
n=n mod 10
m=m\10
end sub
private sub command1_click( )
dim x as integer,y as integer
x=23:y=65
call procl(x,y)
print x;y
end sub
a)3 65
b)23 65
c)3 60
d)0 65
17. 在窗体上画一个名称为command1命令按钮和三个名称分别为label1、label2、label3的标签,然后编写如下**:
private x as integer
知识问答题
2011年零售客户知识问答题。一 必答题。1 请说出7匹狼系列卷烟中的3个卷烟品牌名称?2 请说出2010年底新上市卷烟七匹狼 通仙 的广告宣传语是什么?答案 吐纳有度通仙情怀。3 请分辨出以下几种卷烟的卷烟类别分别是什么?豪迈狼 软红狼 古田狼 尚品狼。答案 豪迈狼 三类 软红狼 二类 古田狼 四...
知识问答题
a组题。1 负责全国风景名胜区监督管理工作的部门是 d a.林业主管部门b.旅游主管部门。c.土地行政主管部门d.建设主管部门。2 中原佛教八大宗派之一的天台宗是以鸠摩罗什翻译的 法华经 大智度论 中论 等为依据创立的佛教流派,其祖庭是 b a.陕西的华严寺 b.浙江的国清寺 c.河南的少林寺 d....
知识竞赛问答题
29 公司2008年务虚会上对各级领导干部提出了哪些具体要求?30 三个重新认识 指的是什么?31 两级领导班子如何才能搞好班子团结工作?32 当前加强领导班子建设的着力点是什么?33 领导干部如何才能做到讲党性?34 领导干部如何才能做到重品行?35 领导干部如何才能做到讲正义?36 领导干部如何...