Could you please help me with the practice questions before the final exam. Thanks.
1. When defining a variable, the keyword ____ appears at the beginning of the statement.
a. Assign c. Define
b. Declare d. Dim
2. When defining a variable to be used to hold textual information containing multiple characters, the declaration statement should have ____ at the end of the statement.
a. As Char c. As String
b. As Char Type d. As String Type
3. A variable that will be used to hold only True or False values should be declared as a(n) ____ data type.
a. Boolean c. Integer
b. Decimal d. Single
4. A program whose interface will be a window on the screen of a computer running the Windows operating system, and which will allow the user to interact with the program by using this window, is created by selecting a ____ project in Visual Studio.
a. Web application c. Windows application
b. Console application d. Custom control
5. Properties can be displayed in the Properties window ____.
a. grouped by category or by the order they appear on the screen
b. grouped by category or sorted numerically
c. sorted alphabetically by name or grouped by size
d. sorted alphabetically by name or grouped by category
6. The ____ sign is used in an assignment statement.
a. plus (+) c. ampersand (&)
b. equal (=) d. percent (%)
7. Which of the following is the correct general format for assigning a value to a property?
a. propertyvalue = propertyname.objectname
b. propertyvalue = objectname.property
c. propertyname.objectname = propertyvalue
d. objectname.property = propertyvalue
8. The ____ feature displays all allowable entries you can make in a Visual Basic statement each time a dot, equal sign, or other special character required for the statement is typed.
a. AutoComplete c. IntelliComplete
b. AutoSense d. IntelliSense
9. When you type the word ____ followed by a period in the code editor, IntelliSense displays a list of all the entries, including all the objects that can be specified in the statement.
a. Me c. MyForm
b. My d. VB
10. A(n) ____ is used for denoting a comment statement.
a. semi-colon (;) c. apostrophe (‘)
b. period (.) d. comma (,)
11. Comments are displayed (by default) with ____.
a. a green squiggly line c. blue text
b. green text d. a blue squiggly line
12. The ____ prefix is used for a Menu object.
a. menu c. mst
b. mns d. mnu
13. The ____ character is used to indicate that a letter is a hot key on a menu item.
a. ampersand (&) c. back slash (\)
b. forward slash (/) d. underscore (_)
14. The hot key for a menu item can be activated with the keyboard by pressing the ____ key and the hot key at the same time.
a. ALT c. CTRL
b. SHIFT d. TAB
15. The ____ object provides a text box that asks the user for input and provides an input area.
a. label c. textbox
b. menu d. Radio button
16. Which line of code will add the value “East” to a ListBox object named lstDirections?
a. lstDirections.Add(“East”) c. lstDirections.AddValue(“East”)
b. lstDirections.Items.Add(“East”) d. lstDirections.Items.AddValue(“East”)
17. To remove all objects from a ListBox object, the ____ method is used.
a. Clear c. Empty
b. Items.Clear d. Items.Empty
18. The ____ property of a ListBox object identifies which item in the ListBox was selected.
a. Item c. Selected
b. ItemSelected d. SelectedItem
19. The compound operator ____ adds the value of the right operand to the value of the left operand and stores the result in the left operand’s variable.
a. ++ c. =+
b. += d. ==
20. The compound operator ____ is used to add a string to an existing string.
a. &= c. &&
b. =& d. ==
21. The ____ follows the keyword For in a For...Next loop.
a. keyword Next c. keyword To
b. keyword Step d. a control variable name
22. A For...Next loop with a beginning value of 1, an ending value of 25, and a step value of 3 will execute ____ times.
a. 3 c. 9
b. 8 d. 25
23. How many times will the following loop execute?
For intCount = 10 To 16 Step 2
‘Body of Loop
Next
a. 3 c. 6
b. 4 d. 7
24. How many times will the following loop execute?
For intCount = 10 To 1 Step -2
‘Body of loop
Next
a. 4 c. 9
b. 5 d. 10
25. What will be the value of the variable intTotalCount when the following code is executed?
For intOuterCount = 1 to 5
For intInnerCount = 1 to 4
intTotalCount +=1
Next
Next
a. 4 c. 9
b. 5 d. 20
2007-04-04
03:49:06
·
2 answers
·
asked by
Anonymous
in
Programming & Design