学习网考试学习资料

Gzu521.com

2007年9月计算机二级VB模拟试题(12)及答案(2)

全国计算机等级考试   点击:次   发布时间:2007-9-19   【字体: 】   来源:Gzu521.com
Gzu521.com我的学习网

(21) 通过设置何属性可以改变所画图形的形状?
a) shape       
b) index
c) enabled      
d) height
正确答案:  a

(22) 在窗体上画一个命令按钮,然后编写如下事件过程:
private sub command1_click()
   s=1
   do
      s=(s + 1) * (s + 2)
      number=number + 1
   loop until s >=30
   print number, s
end sub
程序运行后,输出的结果是
a) 2 3       
b) 2 56
c) 5 12       
d) 10 20
正确答案:  b

(23) 下列程和序段的执行结果为
x=int(rnd() + 9)
select case x
   case 10
      print "excellent"
   case 9
      print "good"
   case 8
      print "pass"
   case else
      print "fail"
end select
a) excellent      
b) good
c) pass       
d) fail
正确答案:  b

(24) 下列程序段的执行结果为
a=75
if a > 60 then score=1
if a > 70 then score=2
if a > 80 then score=3
if a > 90 then score=4
print " score="; score
a) score=1      
b) score=2
c) score=3      
d) score=4
正确答案:  b

(25) 下列程序段的执行结果为
i=1
x=5
do
   i=i + 1
   x=x + 2
loop until i >=7
print "i="; i
print "x="; x
a) i=4       
  x=5 
b) i=7
 x=15
c) i=6       
   x=8  
d) i=7      
   x=17
正确答案:  d

(26) 下面的程序的运行结果是
a=1
b=1
do
   a=a^2
   b=b + 1
loop until b > 5
print "k="; a; spc(4) ; "b="; b + a
a) k=7       
 b=14      
b) k=6
    b=6
c) k=4       
 b=8       
d) k=1
     b=7
正确答案:  d

(27) 单击命令按钮,下列程序的执行结果为
private sub command1_click()
   dim x as integer, y as integer
   x=32: y=42
   call pcs(x, y)
   print x; y
end sub
public sub pcs(byval n as integer, byval m as integer)
   n=n mod 10+1
   m=m mod 10+1
end sub
a) 32  42      
b) 2  32
c) 2  3       
d) 12  3
正确答案:  a

(28) 下列程序的执行结果为
private sub command1_click()
   dim s1 as string, s2 as string
   s1="abcd"
   call transfer(s1, s2)
   print s2
end sub
private sub transfer (byval xstr as string, ystr as string)
   dim tempstr as string
   i=len(xstr)
   do while i >=1
       tempstr=tempstr + mid(xstr, i, 1)
       i=i - 1
   loop
   ystr=te mpstr
end sub
a) dcba       
b) abdc
c) abcd       
d) dabc
正确答案:  a

(29) 单击命令按钮,下列程序的执行结果是
private sub blck(x as integer)
   x=x * 2 + 1
   if x < 6 then
       call blck(x)
   end if
   x=x * 2 + 1
   print x;
end sub
private sub command1_click()
   blck 2
end sub
a) 23  47      
b) 10  36
c) 22  44      
d) 24  50
正确答案:  a

(30) 有如下程序:
private sub command1_click()
   dim a as integer
   a=2
   for i=1 to 3
      print gad (a)
      next i
end sub
function gad (a as integer)
   b=0
   static c
   b=b + 1
   c=c + 1
   gad=a + b + c
end function
运行上面的程序后,单击命令按钮,输出结果为
a)1        
   2            
   3             
 b) 2
     3
     4     
c) 4
    5
    6    
d) 1
     4
     6
         
正确答案:  c

上 一 页 下 一 页
3页: 第 [1] [2] [3]

责任编辑:gzu521

IT认证分类
计算机软件水平考试
全国计算机等级考试
思科认证
微软认证
ORACLE/CIW认证
Linux认证
JAVA认证
其它认证
分类推荐信息
更多...
大类最新文章
更多...