Chapter 10 (Files)

Description

Computer Science Flashcards on Chapter 10 (Files), created by Andrew Lewis on 14/12/2020.
Andrew Lewis
Flashcards by Andrew Lewis, updated more than 1 year ago
Andrew Lewis
Created by Andrew Lewis over 3 years ago
2
0

Resource summary

Question Answer
A file that data is written to is known as an _____. Output File
A file that data is read from is known as an _____. Input File
Before a file can be used by a program, it must be _____. Opened
When a program is finished using a file, the file should be _____. Closed
The contents of this type of file can be viewed in editor such as Notepad. Contents have been encoded as text, using a scheme such as ASCII or Unicode. Text File
This type of file contains data that has not been converted to text. Binary File
When working with this type of file, you access its data from the beginning of the file to the end of the file. All data must be read and no skips can be made. Sequential Access File
When working with this type of file, you can jump directly to any piece of data in the file without reading the data that comes before it. Direct Access File (Random Access File)
This is a small "holding section" in memory that many systems write data to before writing the data to a file. Increases system's performance. When this is full or when the file is closing, the computer's OS writes the contents to the file. Buffer
This is a character or set of characters that marks the end of a piece of data. Used to separate the different items that are stored in a file. Delimiter
This is a character or set of characters that marks the end of a file. EOF Marker (End-of-File Marker)
This marks the location of the next item that will be read from a file. When an input file is opened, it will automatically be set to the first item in the file. Read Position
When a file is opened in this module, data will be written at the end of the file's existing contents (the existing contents won't be erased upon reopening). If the file doesn't exist, it will be created. Append Mode
True/False: The expression "NOT eof(myFile)" is equivalent to "eof(myFile) == False". True
This is a single piece of data within a record. Field
Short sequence of characters that appear at the end of a filename preceded by a period. (Example: .jpg, .txt, .doc) Filename Extension
A complete set of data that describes one item. Record
Document that describes the fields that are stored in a particular file, including their data types. File Specification Document
Program that performs an ongoing task, but temporarily interrupts the task when a control variable changes its value. When this happens, some other action is performed and then the program resumes its ongoing task. Control-Break Processing
A _____ is used to design the appearance of the printed report. Its a sheet of paper that has a grid, similar to graph paper. Print Spacing Chart
There are always three steps that must be taken when a file is used by a program. What are they? Open the file, Process the file, and Close the file.
True/False: In most languages, if a file with the specified external name already exists when the file is opened, the contents of the existing file will be erased. True
Where are files normally stored? On the computer's disk.
When writing a program that performs an operations on a file, what two file-associated names do you have to work with in your code? The file's external name and internal name. The external name is the file name that identifies the file on the disk. The internal is like a variable name. It identifies the file in your program code.
What is the purpose of opening a file? Opening a file creates a connection between the file and the program. It also creates an association between the file and its internal name.
What is the purpose of closing a file? Closing a file disconnects the file from the program.
What is the purpose of the "eof" function? To determine whether or not the end of a file has been reached.
Is it acceptable for a program to attempt to read beyond the end of a file? No, this would usually cause an error.
What would it mean if the expression "eof(myFile)" were to return "True"? The the end of the file "myFile" has been reached.
Show full summary Hide full summary

Similar

TOEFL English Vocab (A - M)
Ali Kane
Random German A-level Vocab
Libby Shaw
Vocabulary Words
Jenna Trost
TOEFL English Vocabulary (N - Z)
Ali Kane
L'environnement
Bryony Whitehead
TOEFL Vocabulary
aliking
French 1A Vocab
Jade Allatt
10 animals in spanish
Jlaal Mohammed
TOEFL Vocabulary Test
Ali Kane
French 1B Vocab (numbers)
Jade Allatt
French 1D Vocab
Jade Allatt