Deck 9: Sequential Access Files and Printing

Full screen (f)
exit full mode
Question
If a data file is not on the drive specified in an AppendText method, it is created by the computer.
Use Space or
up arrow
down arrow
to flip the card.
Question
When a program sends data to a file on a disk, this is referred to as "writing to the file."
Question
The WriteLine method will generate a line feed and carriage return at the end of the data after execution.
Question
The WriteLine method, when used to place data in a data file, positions the file pointer on the current line after the data is written to the data file.
Question
Records in a random file can only be retrieved randomly from the file.
Question
A binary file is always accessed sequentially, in other words, the data in the file is accessed consecutively from beginning to end.
Question
The CreateText method creates a new, empty sequential access file.
Question
A binary data file is also referred to as a text file.
Question
You use a StreamReader object to write a sequence of characters to a sequential access file.
Question
"Reading the file" refers to getting information from the file.
Question
The Exists method returns the path information for a file when it executes.
Question
A fixed-spaced font allows you to align the text that appears in a printout.
Question
The e.Graphics.DrawString method allows for both horizontal and vertical positioning on the page.
Question
Any attempt to use the OpenText method generates an error message if the file does not exist.
Question
The information in a sequential file is always accessed sequentially.
Question
The Write method, when used to place data in a file, positions the file pointer on the next line after the write instruction executes.
Question
The LookAhead method is used to look at the data file and see if additional data exists in the data file.
Question
The OpenText method allows data to be written to a data file.
Question
The Exists method can be used to determine if a data file on the disk has data records contained in it.
Question
The WriteLine method generates a line terminator character at the end of the line written.
Question
When writing records to a sequential access file, you typically write multiple records on each line in the file.
Question
The ____ method is used to look into the data file and determine if additional data exists.

A) LookAhead
B) Look
C) Peek
D) ReadLine
Question
You use the PrintPage event to indicate the information you want to print, and how you want the information to appear in the printout.
Question
Which is the appropriate function when ten blank spaces need to be inserted into a file?

A) Blanks(10)
B) Space(10)
C) Insert(10)
D) AddSpace(10)
Question
Where from the left edge of the paper will the following line of code begin printing? e.Graphics.DrawString("Report Header", New Font("tahoma", 14, FontStyle.Regular),Brushes.Black, 12, 15)

A) 10
B) 12
C) 14
D) 15
Question
What font size will the following line of code print? e.Graphics.DrawString("Report Header", New Font("tahoma", 14, FontStyle.Regular),Brushes.Black, 12, 15)

A) 10
B) 12
C) 14
D) 15
Question
Which of the following methods will allow data to be used as input from an existing data file?

A) OpenText
B) CreateText
C) AppendText
D) AddText
Question
Which of the following methods will allow data to be added to an existing data file?

A) OpenText
B) CreateText
C) AppendText
D) AddText
Question
Which of the following methods will erase data in an existing data file?

A) OpenText
B) CreateText
C) AppendText
D) CloseText
Question
A record is one or more related fields that contain all of the necessary data about a specific person, place, or thing.
Question
To print data on the printer, you use the ____ method.

A) e.Print.Graphics
B) e.Graphics.Print
C) e.Graphics.DrawStrings
D) e.Printer.DrawStrings
Question
Where from the top edge of the paper will the following line of code begin printing? e.Graphics.DrawString("Report Header", New Font("tahoma", 14, FontStyle.Regular),Brushes.Black, 12, 15)

A) 10
B) 12
C) 14
D) 15
Question
In most cases, you use a fixed-spaced font when printing a report on the printer.
Question
The PadLeft and PadRight methods can be used to align columns of information written to a sequential access file.
Question
A file that data is written to is referred to as a(n) ____ file.

A) report
B) text
C) output
D) data
Question
From which of the following can data records be retrieved in any order?

A) binary access files
B) sequential access files
C) random access files
D) serial access files
Question
A ____ access file is also referred to as a text file.

A) serial
B) random
C) binary
D) sequential
Question
To close an input file after it has been used and is no longer necessary, use the ____ method.

A) CloseOutput
B) CloseInput
C) Close
D) Exit
Question
You use the ____ method to read a line of text from a sequential access file.

A) Scan
B) ReadData
C) ReadLine
D) Peak
Question
To close an output file after it has been used and is no longer necessary, use the ____ method.

A) CloseOutput
B) CloseInput
C) Close
D) Exit
Question
Assume that the variable amount contains the value 46. How many characters will be padded in the statement? amount=amount.ToString.PadLeft(5)

A) 2
B) 3
C) 4
D) 5
Question
The method used to display a form on the screen before the Load Event procedure is completed is the ____ method.

A) Display
B) Show
C) Reveal
D) Output
Question
What value does the Peek method return when there is no more data in the file being processed?

A) -1
B) 0
C) 1
D) Nothing
Question
Which of the statements can be used to fill a string variable with asterisks resulting in the following; *****$675.89?

A) amount=amount.Fill(12,"*")
B) amount=amount.Insert(5,"*")
C) amount=amount.PadLeft(12,"*")
D) amount=amount.Space(5, "*")
Question
If a file is designated by name only, without a folder path, the computer will search in the current project's ____ folder.

A) program
B) bin
C) system
D) files
Question
A ____ is a single item of information about a person, place, or thing.

A) file
B) record
C) database
D) field
Question
The font type that uses a varying amount of space for different characters is known as a ____ spaced font.

A) fixed
B) mono
C) proportionally
D) random
Question
A file from which data is retrieved by the computer is referred to as a(n) ____ file.

A) storage
B) serial
C) input
D) report
Question
To determine if a file is actually on a disk before an open statement is executed, you can execute the ____ method first.

A) Exists
B) Locate
C) Find
D) Peek
Question
A sequence of characters is referred to as a ____.

A) loop
B) stream
C) cycle
D) circuit
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/50
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 9: Sequential Access Files and Printing
1
If a data file is not on the drive specified in an AppendText method, it is created by the computer.
True
2
When a program sends data to a file on a disk, this is referred to as "writing to the file."
True
3
The WriteLine method will generate a line feed and carriage return at the end of the data after execution.
True
4
The WriteLine method, when used to place data in a data file, positions the file pointer on the current line after the data is written to the data file.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
5
Records in a random file can only be retrieved randomly from the file.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
6
A binary file is always accessed sequentially, in other words, the data in the file is accessed consecutively from beginning to end.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
7
The CreateText method creates a new, empty sequential access file.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
8
A binary data file is also referred to as a text file.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
9
You use a StreamReader object to write a sequence of characters to a sequential access file.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
10
"Reading the file" refers to getting information from the file.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
11
The Exists method returns the path information for a file when it executes.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
12
A fixed-spaced font allows you to align the text that appears in a printout.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
13
The e.Graphics.DrawString method allows for both horizontal and vertical positioning on the page.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
14
Any attempt to use the OpenText method generates an error message if the file does not exist.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
15
The information in a sequential file is always accessed sequentially.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
16
The Write method, when used to place data in a file, positions the file pointer on the next line after the write instruction executes.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
17
The LookAhead method is used to look at the data file and see if additional data exists in the data file.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
18
The OpenText method allows data to be written to a data file.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
19
The Exists method can be used to determine if a data file on the disk has data records contained in it.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
20
The WriteLine method generates a line terminator character at the end of the line written.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
21
When writing records to a sequential access file, you typically write multiple records on each line in the file.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
22
The ____ method is used to look into the data file and determine if additional data exists.

A) LookAhead
B) Look
C) Peek
D) ReadLine
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
23
You use the PrintPage event to indicate the information you want to print, and how you want the information to appear in the printout.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
24
Which is the appropriate function when ten blank spaces need to be inserted into a file?

A) Blanks(10)
B) Space(10)
C) Insert(10)
D) AddSpace(10)
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
25
Where from the left edge of the paper will the following line of code begin printing? e.Graphics.DrawString("Report Header", New Font("tahoma", 14, FontStyle.Regular),Brushes.Black, 12, 15)

A) 10
B) 12
C) 14
D) 15
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
26
What font size will the following line of code print? e.Graphics.DrawString("Report Header", New Font("tahoma", 14, FontStyle.Regular),Brushes.Black, 12, 15)

A) 10
B) 12
C) 14
D) 15
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
27
Which of the following methods will allow data to be used as input from an existing data file?

A) OpenText
B) CreateText
C) AppendText
D) AddText
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
28
Which of the following methods will allow data to be added to an existing data file?

A) OpenText
B) CreateText
C) AppendText
D) AddText
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
29
Which of the following methods will erase data in an existing data file?

A) OpenText
B) CreateText
C) AppendText
D) CloseText
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
30
A record is one or more related fields that contain all of the necessary data about a specific person, place, or thing.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
31
To print data on the printer, you use the ____ method.

A) e.Print.Graphics
B) e.Graphics.Print
C) e.Graphics.DrawStrings
D) e.Printer.DrawStrings
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
32
Where from the top edge of the paper will the following line of code begin printing? e.Graphics.DrawString("Report Header", New Font("tahoma", 14, FontStyle.Regular),Brushes.Black, 12, 15)

A) 10
B) 12
C) 14
D) 15
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
33
In most cases, you use a fixed-spaced font when printing a report on the printer.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
34
The PadLeft and PadRight methods can be used to align columns of information written to a sequential access file.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
35
A file that data is written to is referred to as a(n) ____ file.

A) report
B) text
C) output
D) data
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
36
From which of the following can data records be retrieved in any order?

A) binary access files
B) sequential access files
C) random access files
D) serial access files
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
37
A ____ access file is also referred to as a text file.

A) serial
B) random
C) binary
D) sequential
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
38
To close an input file after it has been used and is no longer necessary, use the ____ method.

A) CloseOutput
B) CloseInput
C) Close
D) Exit
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
39
You use the ____ method to read a line of text from a sequential access file.

A) Scan
B) ReadData
C) ReadLine
D) Peak
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
40
To close an output file after it has been used and is no longer necessary, use the ____ method.

A) CloseOutput
B) CloseInput
C) Close
D) Exit
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
41
Assume that the variable amount contains the value 46. How many characters will be padded in the statement? amount=amount.ToString.PadLeft(5)

A) 2
B) 3
C) 4
D) 5
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
42
The method used to display a form on the screen before the Load Event procedure is completed is the ____ method.

A) Display
B) Show
C) Reveal
D) Output
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
43
What value does the Peek method return when there is no more data in the file being processed?

A) -1
B) 0
C) 1
D) Nothing
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
44
Which of the statements can be used to fill a string variable with asterisks resulting in the following; *****$675.89?

A) amount=amount.Fill(12,"*")
B) amount=amount.Insert(5,"*")
C) amount=amount.PadLeft(12,"*")
D) amount=amount.Space(5, "*")
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
45
If a file is designated by name only, without a folder path, the computer will search in the current project's ____ folder.

A) program
B) bin
C) system
D) files
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
46
A ____ is a single item of information about a person, place, or thing.

A) file
B) record
C) database
D) field
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
47
The font type that uses a varying amount of space for different characters is known as a ____ spaced font.

A) fixed
B) mono
C) proportionally
D) random
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
48
A file from which data is retrieved by the computer is referred to as a(n) ____ file.

A) storage
B) serial
C) input
D) report
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
49
To determine if a file is actually on a disk before an open statement is executed, you can execute the ____ method first.

A) Exists
B) Locate
C) Find
D) Peek
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
50
A sequence of characters is referred to as a ____.

A) loop
B) stream
C) cycle
D) circuit
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 50 flashcards in this deck.