1. The Visual Basic Code Editor will automatically detect certain types of errors as you are
entering code
A. True
B. False
Ans: A
2. Keywords are also referred to as reserved words
A. True
B. False
Ans: A
3. 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
Ans: A
4. Visual Basic responds to events using which of the following?
A. a code procedure
B. an event procedure
C. a form procedure
D. a property
Ans: B
5. When the user clicks a button, _________ is triggered
A. an event
B. a method
C. a setting
D. a property
Ans: A
6. What property of controls tells the order they receive the focus when the tab key is pressed
during run time?
A. Focus order
B. Focus number
C. Tab index
D. Control order
Ans: C
7. Sizing Handles make it very easy to resize virtually any control when developing applications
with Visual Basic. When working in the Form Designer, how are these sizing handles
displayed?
A. A rectangle with 4 arrows, one in each corner, around your control
B. A 3-D outline around your control
C. A rectangle with small squares around your control
D. None of the above
Ans: C
8. The Properties window plays an important role in the development of Visual Basic
applications. It is mainly used
A.to change how objects look and feel
B. when opening programs stored on a hard drive
C. to allow the developer to graphically design program components
D. to set program related options like Program Name, Program Location, etc
Ans: A
9. When creating a new application in Visual Basic, you are asked to supply a name for the
program. If you do not specify a name, a default name is XXXXX XXXXX is this default
name?
A. Wapplication followed by a number
B. Application followed by a number
C. WindowsApplication
D. WindowsApplication followed by a number
Ans: C,B
10. Which of the properties in a control's list of properties is used to give the control a
meaningful name?
A. Text
B. ContextMenu
C. ControlName
D. Name
Ans: D
11. Pseudocode is
A. data that have been encoded for security
B. the incorrect results of a computer program
C. a program that doesn't work
D. the obscure language computer personnel use when speaking
E. a description of an algorithm similar to a computer language
Ans: E
12. An algorithm is defined as:
A. a mathematical formula that solves a problem
B. a tempo for classical music played in a coda
C. a logical sequence of steps that solve a problem
D. a tool that designs computer programs and draws the user interface
Ans: C
13. A variable declared inside an event procedure is said to have local scope
A. True
B. False
Ans: A
14. A variable declared outside of an event procedure is said to have class-level scope
A. True
B. False
Ans: A
15. Option Explicit requires you to declare every variable before its use
A. True
B. False
Ans: A
16. The value returned by InputBox is a string
A. True
B. False
Ans: A
17. What is the correct statement when declaring and assigning the value of 100 to an Integer
variable called numPeople
A. Dim numPeople =
B. Dim numPeople = Int(100)
C. numPeople = 100
D. Dim numPeople As Integer = 100
Ans: D
18. Which of the following arithmetic operations has the highest level of precedence?
A. + -
B. * /
C. ^ exponentiation
D. ( )
Ans: C
19. What value will be assigned to the numeric variable x when the following statement is
executed? x = 2 + 3 * 4
A. 20
B. 14
C. 92
D.234
Ans: B
20. Which of the following is a valid name for a variable?
A. Two_One
B. 2One
C. Two One
D. Two.One
Ans: A
21. 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)
Ans: C
22. To continue a long statement on another line, use:
A. an underscore character
B. an ampersand character
C. Ctrl + Enter
D. a space followed by an underscore character
Ans: A
23. What is the proper syntax when using a message dialog box?
A. MessageBox.Show("Hi there", "Hi")
B. MessageBox.Show(Hi there, Hi)
C. MessageBox.Show "Hi There", "Hi"
D. MessageBox.Show Hi There, Hi
Ans: A
