wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Grade 8 Visual Basic Quiz

Total questions: 142

Worksheet time: 2hrs 42mins

Name
Class
Date
1.
What data type would you use for a whole number? 
a)
String
b)
Integer
c)
Decimal
d)
Boolean
2.
What data type would you use to return a value of true or false?
a)
String
b)
Integer
c)
Real
d)
Boolean
3.
How would you declare a variable for someone's age?
a)
Dim age as string
b)
Dim Number as decimal
c)
Dim Number as integer
d)
Dim Age as integer
4.
A variable's value can change throughout the program:
a)
True
b)
False
5.
What is an IF statement also known as?
a)
Options
b)
Selection
c)
Declaring
d)
Choosing
6.
This symbol (<)  means more than?
a)
True
b)
False
7.
All tools on your form should be named appropriately?
a)
True
b)
False
8.

Visual Basic Studios is an example of _______________________ programming?

a)

Object-oriented

b)

Natural language

c)

Operands

d)

Procedural

9.

If Francis wants to edit the BackColor, foreColor and visibility of the label, he must proceed to the _______________.

a)

Toolbox

b)

Property

c)

Windows explorer

d)

Solution explorer

10.

Kuya Ruver is about to put all the objects on the form such as textbox and checkbox, what essential part of Visual Studio does he imply?

a)

Property

b)

Windows explorer

c)

Toolbox

d)

Solution explorer

11.

Which of the following is a relational operator that means “Less than or Equal to”?

a)

<=

b)

>=

c)

<>

d)

=<

12.

This is a blank form that shows automatically when starting a Visual Basic program.

a)

Menu Bar

b)

Toolbox

c)

Properties window

d)

Windows form object

13.

Classify the data type that must be held in each variable.

INT - for integer

DOUBLE - for double

STRING - for string


Q: LOCKER NUMBER As ______

a)

DOUBLE

b)

STRING

c)

INT

14.

Classify the data type that must be held in each variable.

INT - for integer

DOUBLE - for double

STRING - for string


Q: STUDENT NAME As ______

a)

DOUBLE

b)

STRING

c)

INT

15.

Classify the data type that must be held in each variable.

INT - for integer

DOUBLE - for double

STRING - for string


Q: SCHOOL ADDRESS As _____

a)

DOUBLE

b)

STRING

c)

INT

16.

Classify the data type that must be held in each variable.

INT - for integer

DOUBLE - for double

STRING - for string


Q: FLOOR NUMBER As ____

a)

DOUBLE

b)

STRING

c)

INT

d)

CONST

17.
Which of these names would be most appropriate for a button that allows the user to submit the answer?
a)
Answer
b)
Button1
c)

btnSubmit

d)
Button1.text
18.
What would be the best name for this control? 
a)
Textbox1.text
b)

Textbox.Text

c)
Name
d)

txtName

19.
What is a variable? 
a)
A value that can change depending on the conditions or information passed through the program
b)
The label of a control
c)
An IF statement
d)
None of these answers
20.
What data type would this information be? 
a)
Decimal
b)
Currency
c)
Integer
d)
Number
21.
What data type would this information be? 
a)
Boolean
b)
String
c)
Integer
d)
Decimal
22.
What data type would this information be? 
a)
Boolean
b)
String
c)
Integer
d)
Decimal
23.
How would you declare a variable for the age of someone? 
a)
DECLARE Age as decimal
b)
DIM Age as integer
c)
DIM Age as decimal
d)
DECLARE Age as integer
24.

How would you make the variable "Surname" equal to the information that they have put in the txtSurname?

a)

Dim Surname As String = txtSurname

b)

Declare "Surname" As String = txtSurname

c)

Dim txtSurname As String = Surname

d)

Dim Surname As String = txtSurname.text

25.

In Visual Basic, the extension to represent project file

a)

.frm

b)

.vbx

c)

.vbp

d)

.vb

26.

The Function and procedure in Visual Basic are by default

a)

Private

b)

Public

c)

Protected

d)

None of the above

27.

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

a)

&

b)

@

c)

$

d)

#

28.

Variable scope and lifetime in Visual Basic can be

a)

Module

b)

Public

c)

Static

d)

Private

e)

All of the above

29.

Variables are named storage locations in memory, the value of which does not change during program

a)

execution

b)

design

c)

debug

d)

none of the above

30.

The default Data type for Visul Basic is

a)

Integer

b)

Decimal

c)

Variant

d)

String

31.

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

a)

Check Box

b)

Option Button

c)

Combo Box

d)

List Box

32.

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

a)

Show

b)

Visible

c)

Enabled

d)

Hide

33.

Module Level Variable are declared using the ____ or the___ keyword.

(a)  

34.

_____ use to store alphanumeric values. A variable length string can store approximately 4 billion characters.

a)

String

b)

Boolean

c)

variant

d)

date

35.

A (a)   level variable is available to all the procedures in the module.

36.

You can change the (a)   of the button & also its size.

37.

vb stands for

a)

visual basic

b)

visual bytes

c)

very basic

d)

visual bits

38.

Properties window short cut key

a)

ctrl R

b)

F4

c)

F2

39.

F2 is the shortcut key for

a)

Form layout window

b)

code window

c)

Object browser

40.

____ variables are not reinitialized each time visual basic invokes a procedure and thus retains or preserves value even when a procedure ends

a)

Static

b)

dynamic

c)

virtual

d)

private

41.

The divide-and-conquer-method of problem solving breaks a problem into large, general pieces first, then refines each piece until the problem is manageable.

a)

true

b)

false

42.

______ Control is used to provide an identifiable grouping of other controls.

a)

(A) Frame

b)

(B) Label

c)

(C) List Box

d)

(D) Command Button

43.

To repeat the statement again and again we use …….

a)

for loop

b)

select case

c)

if condition

44.

……….. is an action recognized by a form or the control.  

a)

Property

b)

Method

c)

Event

45.

Frame control acts as a ______

a)

(A) Event

b)

(B) Method

c)

(C) Class

d)

(D) container

46.

In visual basic the declaration of variables is done by _____ keyword.

a)

(A) Int

b)

(B) Dim

c)

(C) Static

d)

(D) Declare

47.

This event occurs when the form is loaded.

a)

Activate Event

b)

Load Event

c)

Gotfocus

48.

What is the output of this flowchart if the time is 6:30 a.m?

a)

Take subway and reach school.

b)

Take bus and reach school.

c)

Take subway, get the bus and reach school.

49.

_______ Window is used to write code

a)

immediate window

b)

Codeeditor window

c)

Properties window

50.

Which value for x would make the following condition true: Not (x >= 5)

a)

x is equal to 7

b)

x is equal to 4

c)

x is equal to 5.001

d)

x is equal to 5.101

51.

The ______ event occurs when the mouse pointer is moved across the screen.

a)

(A) Mouse

b)

(B) Mouse Move

c)

(C) Move

d)

(D) Control

52.

Visual Basic is derived from a high-level programming language called (a)   .

53.

In visual basic a variable name cannot be more than ______ characters.

In visual basic a variable name cannot be more than ______ characters.

a)

(A) 255

b)

(B) 300

c)

(C) 355

d)

(D) 400

54.

The code that is used in a sub procedure to stop execution of a program is :

a)

(A) Exit

b)

(B) End with

c)

(C) End

d)

(D) End sub

55.

Controls are ______

a)

(A) Code

b)

(B) Part of the menus

c)

(C) Rules

d)

(D) Objects

56.

Press __ to start debugging.

a)

F5

b)

F4

c)

F12

d)

F1

57.

Which value for x would make the following condition true: (x >= 5) And (x <= 6)

a)

x is equal to 7

b)

x is equal to 5

c)

x is equal to 5.001

58.

You use ___________ for getting user input.

a)

Textbox

b)

Command button

c)

Labels

59.

Application in VB is created in a Area called ______.

a)

(A) Window

b)

(B) Form

c)

(C) Label

d)

(D) Test box

60.

In visual basic ______ is the extension to represent project file.

a)

(A) .frm

b)

(B) .vbp

c)

(C) .cls

d)

(D) .vb

61.

The default datatype for VB is ______

a)

(A) Integer

b)

(B) Decimal

c)

(C) variant

d)

(D) String

62.

It can hold whole numbers or Fractional numbers.

(a)  

63.

A variable declared inside an event procedure is said to have local scope

a)

True

b)

False

64.

A ___ variable is one that is declared inside a procedure.

a)

Global

b)

local

c)

external

d)

None of the above

65.

MDI Stands for

a)

Malicious Document Interface

b)

Multilevel Document Interface

c)

Multiple  Document  Interface 

66.

……….. is a meaningful name that takes the place of a number or string.  

a)

variable

b)

datatype

c)

constant

67.

(a)   is used to display text on a form.

68.

The variables that Does not change the value during execution of program is _____

a)

(A) Numeric

b)

(B) String

c)

(C) Constant

d)

(D) None of the above

69.

Visual Basic responds to events using which of the following?

a)

code procedure

b)

event procedure

c)

code

d)

procedure

70.

Visual Basic form has ______ extension.

a)

(A) .frm

b)

(B) .form

c)

(C) .vb

d)

(D) .xls

71.

Which property is used to change name of the command button?

a)

(A) Caption

b)

B) Nameset

c)

(C) Fore color

d)

(D) Enable

72.

(a)   is used to fire an event at specific intervals.

73.

Option Explicit requires you to declare every variable before its use.

a)

True

b)

False

74.

Which of the following is a valid Visual Basic conditional statement?

a)

2 < n < 5

b)

2 < n Or < 5

c)

2 < n Or 5

d)

(2 < n) Or (n < 5)

75.

Declaring a variable is to reserve space in memory.

a)

True

b)

False

76.

Variable name should be less than __________ characters.

a)

250

b)

255

c)

200

d)

155

77.

CheckBox is used when the user has got the choice to select (a)   options.

78.

Visual Basic is

a)

command line programmig

b)

user friendly

c)

Event driven

d)

both b and c

79.

Keywords in Visual Basic are words that


a)

should be used when naming variables.

b)

are used to name controls, such as TextBox1, Command2, etc.

c)

have special meaning and should not be used when naming variables.

d)

are used as prefixes for control names (such as txt, btn, lbl, and lst).

80.

Keywords are also referred to as reserved words.

a)

true

b)

false

81.

Variables are the (a)   which are used to store

values temporarily.

82.

Which of the following arithmetic operations has the highest level of precedence?

a)

+ –

b)

* /

c)

^ exponentiation

d)

( )

83.

What screen elements displays the attributes for a form or control that is inserted and selected?

a)

Form layout window

b)

Properties window

c)

Project Exploer

d)

Toolbox

84.

It shows the position of the form on the screen at runtime.

a)

Toolbox

b)

Properties window

c)

Project Exploer

d)

Form layout window

85.

A control that is used to accept an input value to end-user.

a)

Frame

b)

TextBox

c)

Label

d)

CommandButton

86.

It contains controls that can be placed on the form.

a)

ToolBox

b)

Form1

c)

Project Explorer

d)

Properties Window

87.

What toolbox button or control provides user with more than one choice?

a)

OptionButton

b)

ComboBox

c)

CheckBox

d)

CommandButton

88.

Visual Basic is an object-oriented program produced by Adobe Corporaton.

a)

True

b)

False

89.

Serves as a visual and functional container for controls

a)

PictureBox

b)

ComboBox

c)

DriveListBox

d)

Frame

90.

IDE acronym stands for Integrated Developers Environment.

a)

True

b)

False

91.

Displays icons/bitmaps and metafiles. It displays text or acts as a visual container for other controls.

a)

PictureBox

b)

ComboBox

c)

DriveListBox

d)

Frame

92.

Used to carry out the specified action when the user chooses it.

a)

FileListBox

b)

PictureBox

c)

CommandButton

d)

TextBox

93.

A third-generation vent-driven programming language first released by Microsoft in 1991.

a)

JAVA

b)

C++

c)

Visual Basic

d)

Python

94.

A set of instructions to instruct the computer to carry out certain jobs that are very much faster than human beings can do.

a)

Binary Codes

b)

Programming

c)

Information

d)

Visual Basic

95.

In what year Microsoft released the Visual Basic.NET to replaced Visual Basic 6?

a)

2002

b)

2005

c)

2010

d)

2007

96.

This is where all the controls in visual basic are show and inserted into the forms.

a)

Menu Bar

b)

Toolbar

c)

Toolbox

d)

Form Windows

97.

It serves as a quick reference to the various elements of a project namely form, classes and modules.

a)

Code Window

b)

Form Window

c)

Properties Window

d)

Project Window

98.

It allows you to position the forms in your application using a small graphical representation of the screen.

a)

Form Window

b)

Code Window

c)

Form Layout Window

d)

Properties Window

99.

It provide quick access to commonly used commands in the programming environment.

a)

Menu Bar

b)

Toolbar

c)

Toolbox

d)

Form Window

100.

What is the meaning of BASIC?

a)

Beginners’ All-purpose Symbolic Instruction Code

b)

Beginners’ All-purpose System Instruction Code

c)

Beginners’ All-purpose Support Instruction Code

d)

Beginners’ All-purpose Standard Instruction Code

101.

The following are buttons in Toolbar EXCEPT;

a)

Break

b)

View

c)

Design Mode

d)

Text Box

102.

The following are buttons in Toolbox EXCEPT;

a)

Label

b)

Reset

c)

Frame

d)

TabStrip

103.

(a)   allows the user to make a selection from a number of items.

104.

(a)   is used to fire an event at specific intervals.

105.

It can hold whole numbers or Fractional numbers.

(a)  

106.

Variable name should be less than __________ characters.

a)

250

b)

255

c)

200

d)

155

107.

Press __ to start debugging.

a)

F5

b)

F4

c)

F12

d)

F1

108.

(a)   is used to display text on a form.

109.

ComboBox allows the user to make a (a)   of items in the drop-down list.

110.

You can change the (a)   of the button & also its size.

111.

Visual Basic is derived from a high-level programming language called (a)   .

112.

CheckBox is used when the user has got the choice to select (a)   options.

113.
……………… window we can write code
a)
A.  Immediate window 
b)
B.     Locals window
c)
C.  Code editor window 
d)
D.     None of these 
114.
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
115.
A………. displays a list of items from which user can select one or more items  
a)
A. Combo box
b)
B. List box
c)
C. Check box
d)
D.  Scroll bar
116.
 ………. is a collection of Objects  
a)
A. Class
b)
B. Group
c)
C. Project
d)
D. Form
117.
………… method is used to delete items from a list box.  
a)
A. Remove
b)
B. Clear
c)
C. Remove item
d)
D. Delete
118.
To repeat the statement again and again we use …….   
a)
A. for Loop
b)
B. if
c)
C. if else
d)
 D. else if
119.
……….. is an action recognized by a form or the control.  
a)
A. Property
b)
B. Method
c)
C. Event
d)
 D. Procedure
120.
A ………. is a tool you use to create objects on a Visual Basic form.    
a)
A. Control
b)
B. Object
c)
C. Event
d)
D. Property
121.
An ………..is a type of user interface element you create on a Visual Basic form by using a toolbox control.   
a)
A. Control
b)
B. Object
c)
C. Event
d)
D. Property
122.
……….. is a meaningful name that takes the place of a number or string.  
a)
A. Variable
b)
B. Event
c)
C. Constant 
d)
D. Datatype
123.
The body of a for…Next loop in Visual Basic will terminate once the condition is false. 
a)
TRUE
b)
FALSE
124.
When you press the button load event will trigger. 
a)
TRUE
b)
FALSE
125.
TextBox is used to take input and edit the text. 
a)
TRUE
b)
FALSE
126.
Using RadioButton you can select multiple options. 
a)
TRUE
b)
FALSE
127.
Timer will start only when its property enabled is false.
a)
TRUE
b)
FALSE
128.
THIS PROGRAM WILL GIVE OUTPUT AS
Dim i, n, m As Single
  i = Val(TextBox1.Text)
  n = Val(TextBox2.Text)
  For m = i To n
  Dim a As Integer
  a = i * m
  ListBox1.Items.Add(i & "*" & m & "=" & a)
  Next
  End Sub
End Class 
a)
multiplication table
b)
prime or not
c)
factors of given number
d)
sum of n numbers
129.
Visual Basic is a tool that allows you to develop application in…………  
a)
A. Real time
b)
B. Graphical User Interface
c)
C. Menu Driven
d)
D. None Of These 
130.
. ………….. Combines the features of the text box and list box   
a)
A. Picture box 
b)
B. Check box
c)
C. Option button
d)
D. Combo box 
131.
1.  ………… is an example for control   
a)
A. Toolbox
b)
B. Event
c)
C. Method 
d)
D. Code editor
132.
1.   A Boolean datatype can store……….bytes.   
a)
A. 2 byte
b)
B. 4 byte
c)
C. 6 byte
d)
D. 8 byte
133.
1.  The ____ statement checks in the module for usage of any undeclared variables and reports an error to the user. 
a)
A. looping.
b)
B. iteration
c)
 C. dim
d)
D. external
134.
Which window displays a list of all forms and modules making up your application.  
a)
a. Project window
b)
b. Properties window
c)
 c. Form layout Window
d)
 d. All of the above.
135.
1.  The form module has file extension ______  
a)
a. .frm
b)
 b. .frb
c)
c. .fru
d)
d. .fra
136.
.__________ cannot be declared in a form or class module.    
a)
a. Public constants
b)
b. Private constants
c)
c. Static constants
d)
d. None of these.
137.
Statement A: Label is not used to edit the name
Statement B: TextBox is not used to take input; 
a)
a. Statement A is True and B is False 
b)
b. Statement B is True and A is False 
c)
c. Both the statements are True 
d)
d. Both the statements are False
138.
Statement A: Boolean means true or false Statement B: Actions triggered by the system are called object 
a)
a. Statement A is True and B is False 
b)
b. Statement  B is True and A is False 
c)
c. Both the statements are True
d)
d. Both the statements are False
139.
Statement A : Suffix for Long data type is & Statement A : Suffix for Currency data type is #  
a)
a. Statement A is True and B is False 
b)
b. Statement B is True and A is False
c)
c. Both the statements are True 
d)
d. Both the statements are False
140.
Statement A :TextBox property is maxLength Statement B: Label property is Caption  
a)
a. Statement A is True and B is False
b)
b. Statement B is True and A is False
c)
 c. Both the statements are True 
d)
d. Both the statements are False
141.
Statement A : Decimal is not a DataType Statement B:  Properties window is used to change program. 
a)
a. Statement A is True and B is False
b)
 b. Statement B is True and A is False
c)
c. Both the statements are True 
d)
 d. Both the statements are False
142.
Statement A : Objects are actions usually triggered by system; Statement B : Collection of data types and data members are called class.  
a)
a. Statement A is True and B is False 
b)
b. Statement B is True and A is False
c)
c. Both the statements are True 
d)
d. Both the statements are False