wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Visual Basic Assessment

Total questions: 21

Worksheet time: 13mins

Name
Class
Date
1.

Which of these names would be most appropriate for a button that allows the user to submit the answer?

a)

Answer

b)

Button1

c)

SubmitBttn

d)

Button1.text

2.
What would be the best name for this control? 
a)
Textbox1.text
b)
Textbox
c)
Name
d)
NameTxtbox
3.
What data type would this information be? 
a)
Decimal
b)
Currency
c)
Integer
d)
Number
4.
What data type would this information be? 
a)
Boolean
b)
String
c)
Integer
d)
Decimal
5.

The Function and procedure in Visual Basic are by default

a)

Private

b)

Public

c)

Protected

d)

None of the above

6.

Which symbol creates an access(hot) key in the text of a menu item?

a)

&

b)

@

c)

$

d)

#

7.
To start run the application press F5 on the key board
a)
True
b)
False
8.
The first line of the code declares a class with the name of the form window
a)
True
b)
False
9.
What is wrong with the following Do loop?   Dim index As Integer = 1
Do While index <> 9  
MsgBox("Hello")
index =index+1   
Loop
a)
(a)The test variable should not be changed inside a Do loop. 
b)
(b) The test condition will never be true. 
c)
(c) This is an infinite loop. 
d)
(d) Nothing 
10.
Private Sub disp ()
Dim num as Double = 10  
Do While num > 1
MsgBox(num)
 num = num - 3
Loop
End Sub
 What numbers will be displayed in the list box when the button is clicked? 
a)
(a) 10, 7, and 4 
b)
(b)  10, 7, 4, and 1 
c)
(c)10, 7, 4, 1, and -2 
d)
(d) no output
11.

Variable scope and lifetime in Visual Basic can be

a)

Module

b)

Public

c)

Static

d)

Private

e)

All of the above

12.
If the loop is to be executed at least once, the condition should be checked at the __________. 
a)
(A)  top of the loop 
b)
(B)  middle of the loop 
c)
(C)  bottom of the loop 
d)
(D) Nothing should be checked. 
13.

Which type of control is used to design a form like above

a)

Check Box

b)

Option Button

c)

Combo Box

d)

List Box

14.

Which language is not a true object-oriented programming language?

a)

Java

b)

C++

c)

VB 6

d)

VB.NET

15.

Which property determines whether a control is displayed to the user?

a)

Show

b)

Visible

c)

Enabled

d)

Hide

16.
The variable that does not change the value during execution of program is…………..
a)
A.  Numeric 
b)
B. Constant
c)
C. String
d)
D. All of the above
17.

Varieties of Do Loop can not be used in Visual Basic

a)

Do While_Loop

b)

Do_Loop Until

c)

Do_Loop while

d)

Do while_Wend

18.

It displays the properties that are associated with an object.

a)

Project Window

b)

Properties Window

c)

Form Window

d)

Explorer

19.

________________ is used to accept input from the user.

a)

Label Box

b)

Picture Box

c)

Command Box

d)

Text Box

20.

______________ is the code to change the background color of the form.

a)

me.backcolor = "vbred"

b)

me.backcolor : vbred

c)

me.backcolor 'vbred'

d)

me.backcolor = vbred

21.

____________ is used to appear message dialog box.

a)

MsgBox

b)

Label Box

c)

Text Box

d)

Command Box