Filters
Question type

Study Flashcards

You should use the ____ method to close a sequential access file as soon as you are finished using it.


A) Exit
B) Close
C) End
D) Quit

Correct Answer

verifed

verified

Case-Based Critical Thinking Questions Case 1 - Frames Unlimited Frames Unlimited is a wholesale picture and poster frame business. Frame data is stored in sequential access files that contain four columns: item number, item name, size, and price. Which of the following statements should be used first when opening the input file?


A) If IO.File.Exists("pictureFrame57.txt") Then
B) If IO.File.Exists("pictureFrame.txt") Then
C) inFile = IO.File.OpenText("pictureFrame57.txt")
D) inFile = IO.File.OpenText("pictureFrame.txt")

Correct Answer

verifed

verified

Case-Based Critical Thinking Questions Case 1 - Frames Unlimited Frames Unlimited is a wholesale picture and poster frame business. Frame data is stored in sequential access files that contain four columns: item number, item name, size, and price. You need to create a report using the pictureFrame.txt sequential access file. The report provides a list of all picture frames with a size of 5x7. The report will be saved as another sequential access file named pictureFrame57.txt. Your first step is to ____.


A) declare a StreamWriter variable for the output file
B) open the pictureFrame57.txt file for output using the CreateText method
C) declare a StreamReader variable for the input file
D) open the pictureFrame.txt file

Correct Answer

verifed

verified

Write the code to declare a variable named outFile that can be used to write data to a sequential access file. Then write the statement to open a sequential access file named customers.txt for output.

Correct Answer

verifed

verified

Dim outFile As IO.St...

View Answer

Which of the following determines whether an item is selected in the lstTrees control?


A) If lstTrees.SelectedIndex = -1 Then
B) If lstTrees.SelectedIndex -1 Then
C) If lstTrees.SelectedIndex > -1 Then
D) If lstTrees.SelectedIndex

Correct Answer

verifed

verified

B

Files to which information is written are called input files.

Correct Answer

verifed

verified

Files that are read by the computer are called ____ files.


A) storage
B) serial
C) input
D) report

Correct Answer

verifed

verified

C

Write a Structure statement that defines a structure named Vehicle. The structure contains three member variables named strMake , strModel , and intYear . Then write the Private statement that declares a Vehicle variable named truck .

Correct Answer

verifed

verified

Structure Vehicle
Public strM...

View Answer

Write the statement that would remove the selected item from the lstFlowers control if an item is selected.

Correct Answer

verifed

verified

If lstFlowers.Select...

View Answer

You use the ____ member access operator to separate the structure variable's name from the member variable's name.


A) ()
B) arrow
C) asterisk
D) dot

Correct Answer

verifed

verified

D

What is the difference between a structure and a structure variable?

Correct Answer

verifed

verified

A structure is a user-defined data type ...

View Answer

Assume that the variable amount contains the value 46. How many characters will be padded in the statement below? amount = amount.ToString.PadLeft(5)


A) two
B) three
C) four
D) five

Correct Answer

verifed

verified

What is the difference between an input file and an output file?

Correct Answer

verifed

verified

Files that are read by the computer are ...

View Answer

Which of the following declares a StreamReader variable named newFile ?


A) Dim inFile As IO.StreamReader
B) Dim newFile As IO.StreamReader
C) Dim newFile As IO.StreamWriter
D) Dim newFile As StreamReader

Correct Answer

verifed

verified

In Visual Basic, you use a(n) ____ to write a stream of characters to a sequential access file.


A) CreateText method
B) StreamReader object
C) StreamWriter object
D) AppendText method

Correct Answer

verifed

verified

In addition to getting data from the keyboard and sending data to the computer screen, an application can also get data from and send data to a file on a disk.

Correct Answer

verifed

verified

The ____ method writes a newline character after the data.


A) WriteLine
B) ReadLine
C) Write method
D) Read

Correct Answer

verifed

verified

You cannot include an array in a structure.

Correct Answer

verifed

verified

Which of the following removes the sixth item from the lstTrees control?


A) lstTrees.Items.Remove(5)
B) lstTrees.Items.Remove(6)
C) lstTrees.Items.RemoveAt(5)
D) lstTrees.Items.RemoveAt(6)

Correct Answer

verifed

verified

In Visual Basic, you use a(n) ____ to read data from a sequential access file.


A) StreamWriter object
B) OpenText method
C) ReadLine method
D) StreamReader object

Correct Answer

verifed

verified

Showing 1 - 20 of 60

Related Exams

Show Answer