Practice question · Match the pairs
Match each I/O idea to what it means.
- Input
- Output
- Parsing
- Stream
- Converting text into a number
- Data brought into the program
- Reading a file piece by piece rather than all at once
- Results sent out of the program
Hints
- Two terms are the two directions data can flow; two are techniques.
- One technique lets a program handle a file larger than memory.
Show the answer
- Input → Data brought into the program
- Output → Results sent out of the program
- Parsing → Converting text into a number
- Stream → Reading a file piece by piece rather than all at once
Why
Input and output are the two directions; parsing turns text into a usable number; a stream processes a file incrementally so it can be far larger than available memory. The stream model is why a program can read a gigabyte file on a machine with less free memory than that.
Practise Input, Output, and File Thinking
The app has 5 more questions on this lesson, and keeps your place in the course. Computer Science I is free to start.
More questions on Input, Output, and File Thinking
- The open-process-close discipline requires closing a file even when processing fails partway through. Why…
- A program writes to a file, crashes, and the file turns out empty, although the writes clearly executed.…
- Sort each action by whether it is input or output.
- Select every statement that is true of the stream model and file handling.
- Order the steps a program takes to read a number from the user and add ten to it.