Text Files & User-Defined Methods is one of 10 topics in the Grade 11 Information Technology CAPS syllabus, covered across 3 lessons on Study Vault. Below are real practice questions from this topic with full worked answers.
Sample practice questions
Easy
1. What is a text file?
A file that stores data as plain, readable characters, one line following another
A file that can only store numeric data
A file that automatically deletes itself after being read once
A file that can only be created by a spreadsheet program
Answer: A file that stores data as plain, readable characters, one line following another — A text file stores data as plain, readable characters, one line following another, rather than in a specialised internal program format.
Easy
2. What is the "physical file name" of a text file?
The actual name and location the file is saved under on the storage device
The name a program temporarily assigns to data that is never actually saved
A name that only applies to files stored on a USB flash drive
A name that automatically changes every time the file is opened
Answer: The actual name and location the file is saved under on the storage device — The physical file name is the actual name and location the file is saved under on the storage device.
Medium
3. Name the marker that tells a program reading a text file exactly when it has reached the last line and should stop.
Answer: end-of-file marker — The end-of-file marker marks the very end of the entire file, so a reading program knows precisely when to stop.