Name:     ID: 
 
    Email: 

CS104-1 Visual Basic VII

Multiple Choice
Identify the letter of the choice that best completes the statement or answers the question.
 

 1. 

Which of the following will add the word Idaho to a list box named lstState?
a.
lstState.AddItem "Idaho"
b.
lstState.AddList "Idaho"
c.
lstState.Add "Idaho"
d.
lstState.ItemAdd "Idaho"
 

 2. 

Which of the following is a valid Open statement?
a.
Open "a:\test.dat" For Append As #1
b.
Open "a:\test.dat" As #1
c.
Open "a:\test.dat" For Add As #1
d.
none of the above
 

 3. 

The information in a data file is organized into ____.
a.
sequential fields
b.
records and data
c.
files and records
d.
fields and records
 

 4. 

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.
list box's Load event procedure
c.
form's Load event procedure
d.
list box's Click event procedure
 

 5. 

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 = 0
c.
lstName.Select = 1
d.
lstName.ListIndex = 2
 

 6. 

A ____ is a group of related items that contain all of the necessary data about a specific person, place, or thing.
a.
record
b.
field
c.
data file
d.
program file
 

 7. 

Which of the following will stop the loop when there are no more records in the file opened as #1?
a.
Do While EOF>1
b.
Do While Not EOF(1)
c.
Do While EOF Not(1)
d.
none of the above
 

 8. 

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
 

 9. 

When you open an existing sequential access file for Output, Visual Basic will
a.
erase its contents after writing the new information.
b.
erase its contents before writing the new information.
c.
add the new information to the existing data.
d.
none of the above
 

 10. 

You open a sequential access file for ____ when you want to read its contents.
a.
Output
b.
Input
c.
Add
d.
Append
 



 
Submit          Reset Help