Difficulty: Easy
Correct Answer: TYPE REPORT.TXT > PRN
Explanation:
Introduction / Context:
DOS supports device names such as PRN, LPT1, and CON. Redirection and piping allow sending command output to devices or files. Printing from the command line without a dedicated print utility is often accomplished using redirection.
Given Data / Assumptions:
Concept / Approach:
Redirection operator ">" sends standard output to a file or device. Thus, "TYPE filename > PRN" directs text output to the printer device instead of the console, effectively printing the file.
Step-by-Step Solution:
Use TYPE REPORT.TXT to confirm it displays on screen.Add redirection: TYPE REPORT.TXT > PRN.The printer receives the text stream and begins printing.
Verification / Alternative check:
Replace PRN with LPT1 if needed: TYPE REPORT.TXT > LPT1. If printing fails, verify printer setup or try PRINT command where available.
Why Other Options Are Wrong:
Option A uses non-DOS syntax.Options C and D misuse the pipe operator “|”, which connects programs via standard input/output, not directly to device names in this context.Option E is incorrect because Option B is valid and standard.
Common Pitfalls:
Final Answer:
TYPE REPORT.TXT > PRN
Discussion & Comments