Multiple Choice
Identify the
letter of the choice that best completes the statement or answers the question.
|
|
1.
|
When you
open an existing sequential access file for Output, Visual Basic will a. | erase its contents
after writing the new information. | b. | add the new information to the existing
data. | c. | erase its contents before writing the new
information. | d. | none of the above | | |
|
|
2.
|
Which of the
following will add the word Idaho to a list box named lstState? a. | lstState.AddList
"Idaho" | b. | lstState.ItemAdd "Idaho" | c. | lstState.Add
"Idaho" | d. | lstState.AddItem "Idaho" | | |
|
|
3.
|
Which of the
following will stop the loop when there are no more records in the file opened as
#1? a. | Do While EOF
Not(1) | b. | Do While EOF>1 | c. | Do While Not
EOF(1) | d. | none of the above | | |
|
|
4.
|
Which of the
following is a valid Open statement? a. | Open "a:\test.dat" As #1 | b. | Open
"a:\test.dat" For Append As #1 | c. | Open "a:\test.dat" For Add As #1 | d. | none of the
above | | |
|
|
5.
|
Assume the
Sales.dat file was opened as filenumber 1. Which of the following will write the contents of
the intPerson and curSales variables to the Sales.dat file? a. | Write #1 intPerson,
curSales | b. | Write 1, intPerson, curSales | c. | Write #1, intPerson,
curSales | d. | Write intPerson, curSales to #1 | | |
|
|
6.
|
The
information in a data file is organized into ____. a. | files and
records | b. | fields and records | c. | sequential
fields | d. | records and data | | |
|
|
7.
|
If you want
a list box to display its values when the form first appears on the screen, you will need to define
the list box items in the ____. a. | form's Start event procedure | b. | form's Load event
procedure | c. | list box's Click event procedure | d. | list box's Load event
procedure | | |
|
|
8.
|
Which of the
following tells Visual Basic to select the second item in a list box named lstName? a. | lstName.ListIndex =
1 | b. | lstName.ListIndex =
2 | c. | lstName.ListIndex =
0 | d. | lstName.Select =
1 | | |
|
|
9.
|
You open a
sequential access file for ____ when you want to read its contents. a. | Output | b. | Append | c. | Input | d. | Add | | |
|
|
10.
|
A ____ is a
group of related items that contain all of the necessary data about a specific person, place, or
thing. a. | record | b. | data file | c. | program file | d. | field | | |
|