一些VB練習題,急!考試複習的!高手幫幫忙

2021-09-13 06:12:20 字數 4073 閱讀 4747

1樓:匿名使用者

選bdim s(9)

for i=0 to 9

s(i)=3*i

next i

print s(s(3))

(a) 12 (b) 27 (c) 0 (d) 出錯

32、下列陣列宣告正確的是( b )。

(a) n=5

dim a(1 to n) as integer (b) dim a(10) as integer

redim a(1 to 12)

(c) dim a() as single

redim a(3 ,4) as integer (d) dim a() as integer

n=5redim a(1 to n) as integer

33、下列控制元件中,沒有caption屬性的是(b )。

(a) 框架 (b) 列表框 (c) 核取方塊 (d) 單選按鈕

34、下面關於計時器控制元件(timer)的敘述中,錯誤的是( b )。

(a) 計時器控制元件執行時不可見

(b) 通過color屬性可設定計時器控制元件的顏色

(c) 計時器控制元件只有一個事件即timer事件

(d) 計時器的interval屬性值設為0時,計時器無效

35.要在文字框text1中顯示列表框list1中最後一個專案的正確語句是( c )。

(a)text1.text=list1.list(listcount-1)

(b)text1.text=list1.list(0)

(c)text1.text=list1.list(list1.listcount-1)

(d)text1.text=list1.listindex

36.在組合框combo1中選定某一項,單擊命令按鈕command1即可刪除該項,**如下。

private sub command1_click()

if combo1.listindex <> -1 then

combo1.removeitem _b___

end if

end sub

(a) combo1.listcount (b) combo1.listindex

(c) combo1.text (d) combo1.multiselect

37. 設有如下程式:

private sub command1_click()

dim sum as double, x as double

sum = 0: n = 0

for i = 1 to 5

x = n / i: n = n + 1: sum = sum + x

next

end sub

該程式通過for迴圈計算一個表示式的值,這個表示式是( c )。

(a) 1+1/2+ 2/3+3/4+4/5 (b) 1+1/2+2/3+3/4

(c) 1/2+2/3+3/4+4/5 (d) 1+1/2+1/3+1/4+1/5

38. 在窗體上畫一個名稱為command1的命令按鈕,並編寫如下程式:

private sub command1_click()

dim x as integer

static y as integer

x = 10

y = 5

call f1(x, y)

print x, y

end sub

private sub f1(byref x1 as integer, y1 as integer)

x1 = x1 + 2

y1 = y1 + 2

end sub

程式執行時,單擊命令按鈕,在窗體上顯示的內容是( d )。

(a) 10 5 (b) 12 5 (c) 10 7 (d) 12 7

39. 下列程式段的執行結果為( d)

a=75

if a > 70 then i=2

if a < 90 then i=4

print "i="; i

(a)i=1 (b) i=2 (c) i=3 (d) i=4

40. 從磁碟上讀入一個名為「c:\filel.txt」的順序檔案,下面程式段正確的是( d )。

(a) open "c:\filel.txt" for output as # 2 (b) open c:\filel.txt for input as # 1

(c) f="c:\filel.txt"

open "f" for input as # 2 (d) f="c:\filel.txt"

open f for input as # 1

2樓:奪命狂瀾

1、b 2、b 3、b 4、b 5、c 6、b 7、

vb題練習題,麻煩各位大神幫幫忙

3樓:匿名使用者

8. 下面程式執行後的結果是(4)

a=array(1,2,3,4,5)

print a(a(2))

11. 下面程式有錯的一行(redim a%(1 to 4),i%)redim a%(1 to 4),i%

for i=1 to 4 step 1.6 '第a行a(i)=2*i 』第b行

next i 『第c行

if a(2) then print a(2) '第d行14. 下面程式執行後的輸出結果是()

dim a(3,3),i%,j%

for i=1 to 3

for j=1 to 3

if i+j=4 or i=j then a(i,j)=0 else a(i,j)=1

print a(i,j);

next j

print

next i

0 1 0

1 0 1

0 1 0

16. 下面程式執行後的結果(105)

dim a,f%,i%

a=array(1,"3","5",7)

f=1for i=lbound(a) to ubound(a)f=f*a(i)

next i

print f

17. 下面程式的功能是將一維陣列中的6個數逆序存放並輸出。完成填空。

dim a, i%,j%,t%

a=array(1,2,3,4,5,6)

i=0:j=5

do while(_)

t=a(_)

a(_)=a(_)

a(_)=(_)

i=i+1

(_)loop

for i=0 to 5

print a(i);

next i

dim a, i%, j%, t%

a = array(1, 2, 3, 4, 5, 6)i = 0: j = 5

do while (i < 3)

t = a(i)

a(i) = a(j)

a(j) = t

i = i + 1

j = j - 1

loop

for i = 0 to 5

print a(i);

next i

4樓:乙欣豔

1 對 沒有餘數即是整除

2 對3 錯

vb考試題!那位大哥大姐幫幫忙!!急急急!!!

5樓:心臺

親自作了下,應該沒問題!

1~5:a a a c b

6~10: a c c c d

11~14:c b d a

6樓:匿名使用者

樓主你真行,找周圍的人不就行 了,還打那麼多字。許多書上都有。

7樓:劍soldier兵

aaacb

accad

abba參考

正確率一定不小於百分之五十

關於徐志摩《偶然》的一些練習題,關於徐志摩《偶然》的一些練習題

徐志摩名作欣賞 偶 然 我是天空裡的一片雲,偶爾投影在你的波心 你不必訝異,更無須歡喜 在轉瞬間消滅了蹤影。你我相逢在黑夜的海上,你有你的,我有我的,方向 你記得也好,最好你忘掉,在這交會時互放的光亮!寫於1926年5月,初載同年5月27日 晨報副刊 詩鐫 第9期,署名志摩。這 是徐志摩和陸小曼合寫...

求中華古詩詞的練習題,急需一些古詩詞的練習題

急需一些古詩詞的練習題 中考語文 古詩詞總複習 專項訓練 跪求!練習題!急需!等!加分的!1會挽雕弓如滿月,西北望,射天狼 蘇東坡詞 有朝一日同風起,摶扶搖直上九萬里 李白詩 壯志飢餐胡虜肉,笑談渴飲匈奴血 岳飛詞 仰天大笑出門去,我輩豈是蓬蒿人 李白詩 2李白 黃河之水天上來,奔流到海不復回 劉禹...

英語練習題(初一上冊的),英語練習題(初一上學期)

根據漢語意思完成句子 一空一詞 他叫tong.his name is tong.你的 號碼是多少?我的 號碼是477 8596 what is your telephone number it s 477 8596 對劃線部分提問。ma name is tong brown what s your ...