1. In an If statement, when the
condition is true?
[a]
only the Else clause is executed
[b]
only the ElseIf clause is executed
[c]
only the End If statement is executed
[d]
only the Then clause is executed
2. Which operator(s) has (have)
the highest order of precedence in arithmetic expressions?
[a]
multiplication and division
[b]
addition and subtraction
[c]
exponentiation
[d]
operators are not significant, all calculations are evaluated from left to
right.
3. When you declare a variable or
a named constant, Visual Basic reserves an area of memory and assigns it a name
called a(n)?
[a]
dimension
[b]
identity
[c]
declaration 3
[d] identifier
4. How many bytes of memory will the number 50000
consume if it is declared as a variant?
[a]
13
[b]
14
[c]
15
[d]
16
5. The code that is used in a sub
procedure to stop execution of a program is:?
[a]
Exit
[b] End With
[c] End
[d] End Sub
6. What data-type is a numeric
value entered into a text box treated as by default?
[a]
Integer
[b]
String
[c]
Variant
[d]
None of the above
7. A program construct used for
selection is:?
[a]
iteration
[b]
for loop
[c]
select case
[d]
a sequence.
8. What is the default data-type
in Visual Basic?
[a]
String
[b]
Integer
[c]
Variant
[d]
VB does not have a default data-type
9. Which of the following is the
industry standard prefix for a double-precision floating point data type?
[a]
dou
[b]
dbe
[c]
dbl
[d]
None of the above
10. A memory location that changes
during project execution is known as a…..?
[a]
Dimension
[b]
Constant
[c]
Static
[d]
Variable
11. How many bytes of memory will
the string literal “Hello World!” consume if it is declared as a string?
[a]
21
[b]
22
[c]
23
[d]
24
12. How many bytes of memory will the
string literal “Hello World!” consume if it is declared as a variant?
[a]
31
[b]
32
[c]
33
[d]
34
13. Which is not an integer data
type?
[a]
Single
[b]
Byte
[c]
Short
[d]
Integer
14. Which is a numeric data type?
[a]
Floating point
[b]
Integer
[c]
Boolean
[d]
Both a and b.
[e]
All of the above.
15. The Boolean data type:
[a]
is unsigned.
[b]
has two states.
[c]
is displayed by the program as yes or no.
[d]
Both a and b.
[e]
All of the above.
16. Which is a valid statement for
declaring a variable?
[a]
Const Form As Integer
[b]
Const myForm As Integer
[c]
Dim Form As Integer
[d]
Dim myForm As Integer
[e]
All of the above.
17. The proper operator
precedence, from first to last, is:
[a]
logical, comparison, and arithmetic.
[b]
arithmetic, comparison, and logical.
[c]
arithmetic, logical, and comparison.
[d]
comparison, arithmetic, and logical.
[e]
logical, arithmetic, comparison.
18. Which operator is evaluated
first?
[a]
NOT
[b]
AND
[c]
XOR
[d]
OR
[e]
They are always evaluated left-to-right.
19. The left side of an assignment
statement will hold:
[a]
a variable.
[b]
an object property.
[c]
an expression.
[d]
Both a and b.
[e]
All of the above.
20. The right side of an
assignment statement will hold:
[a]
a variable.
[b]
an object property.
[c]
an expression.
[d]
Both a and b.
[e]
All of the above.
21. Which function displays a
pop-up window?
[a]
MsgBox
[b]
InputBox
[c]
TextBox
[d]
Both a and b.
[e]
All of the above.
22. Which statements are optional
in an If…Then statement?
[a]
If
[b]
Then
[c]
Else
[d]
Both a and b.
[e]
All of the above.
23. Do...Loop is an iterative
statement because it:
[a]
selects a block of statements to run.
[b]
runs the same block of statements repeatedly.
[c]
selects a block of statements and runs it repeatedly.
[d]
selects a block of statements and runs it a specified number of times.
[e]
All of the above.
24. The For…Next Loop is used
when:
[a]
a choice is made based on a Boolean condition.
[b]
a block of statements is executed an unknown number of times.
[c]
a block of statements is executed a known number of times.
[d]
Both a and b.
[e]
All of the above.
25. The scope of a variable refers
to:
[a]
the length of the variable.
[b]
the name of the variable.
[c]
the accessibility of the variable.
[d]
the datatype of the variable.
[e]
the lifetime of the variable.
26. What is the Default Datatype
in Visual Basic?
[a]
Variant
[b]
Integer
[c]
Double
[d]
All of the above
27. A
..............is a group of control that share the same name and type
[a]
Array
[b]
Control Array
[c]
Array Static
[d]
None