NEW
Font size
S
M
L
XL
WorksheetsVariables
Total questions: 10
Worksheet time: 5mins
Name
Class
Date
1.
Which of the following is false?
a)
A Boolean variable holds true/false values.
b)
A single type variable is used for integers only.
c)
A integer type is used for whole numbers.
d)
Char types are used for one letter. or other keyboard characters.
2.
Which variable declaration does not include an error?
a)
Dim myAge as Real
b)
Dim aveTemp As Integer
c)
Dim height As Single
d)
Dim my Age As Integer
3.
Which of the following variables would be the most likely to use a Boolean data type?
a)
passedTest
b)
randomNumber
c)
telNo
d)
itemQuantity
4.
A program stores the X coordinate of an image in the variable, Position.
Which data type would be the best choice for this variable?
Which data type would be the best choice for this variable?
a)
String
b)
Char
c)
Single
d)
Integer
5.
Which type of variable used in Visual Basic would be used to store your total correct answers for this quiz?
a)
Integer
b)
Single
c)
Real
d)
Boolean
6.
The volume of a sphere would be stored using which variable type in Visual Basic?
a)
Single
b)
Real
c)
Integer
d)
Char
7.
Which variable type is the best choice for storing data in telephoneNumber?
a)
Integer
b)
String
c)
Char
d)
Real
8.
Which data type would be used in VB to store the color depth of an image?
a)
Single
b)
Integer
c)
Char
d)
Boolean
9.
Which data type would be used to store data in a variable called dpi to calculate the storage size of a graphic?
a)
Integer
b)
Single
c)
Real
d)
Char
10.
Which of the following is the correct declaration of an array?
a)
Dim myName As String
b)
Dim ages() As integer
c)
Dim pets(5) As Integer
d)
Dim Single As aveTemps(6)
Reset
