Font size
WorksheetsText File Pop Quiz
Total questions: 12
Worksheet time: 9mins
Text files are often used for a variety of purposes in programming, including ...
Storage
Processing Images
Creating Code
Connecting to a databse
What application would you typically open a text file in?
MS Word
Notepad
MS Excel
Delphi
What extension will a text file have?
.wrd
.text
.txt
.tfile
Which line of code would you use to display a text file using a TMemoBox component?
Memo1.Lines.SaveToFile('MyTextFile.txt');
RichEdit1.Lines.SaveToFile('MyTextFile.rtf');
Memo1.Lines.LoadFromFile('MyTextFile.txt');
RichEdit1.Lines.LoadFromFile('MyTextFile.rtf');
Which line of code would you use to save a text file using a TRichEdit component?
Memo1.Lines.SaveToFile('MyTextFile.txt');
RichEdit1.Lines.SaveToFile('MyTextFile.rtf');
Memo1.Lines.LoadFromFile('MyTextFile.txt');
RichEdit1.Lines.LoadFromFile('MyTextFile.rtf');
What is happening in the line of code below?
Var
<fileVariableName>: Textfile;
We are writing to a text file.
We are creating a report from a text file.
We are writing a report to a text file.
We are declaring our text file as a variable.
Which of the following is/are an example/s of a delimiter used in a text file?
Tab
Semi-colon
Comma
Colon
The ____ marker separates the rows of data, and the ___ marker signals the end of the entire file.
<eol>, <csv>
<eoln>, <eof>
<eof>, <eof>
<eof>, <eof>
What is the purpose of the redOut.Clear procedure?
To terminate the application.
To clear all text from the form's RichEdit control.
To close an open file.
To terminate the application.
What does #9 do in the following code?
redDisplay.Lines.Add(#9+'Songs'+#9+'Number of Votes');
Inserts a variable
Inserts a tab
Inserts a comma
Inserts a line break
What does "arr" refer to in the following code?
redDisplay.Lines.Add(#9+arrSongs[i]+#9+inttostr(arrCount[i]));
The loop to be used
The text file being used
The count of repetitions
The array being used
What does it mean to open a file in "append mode"?
It opens the file for reading only.
It overwrites any existing data in the file.
It adds new data to the end of the file.
It adds new data to the beginning of the file.
