Some questions on Input and Output
- Why is it necessary to have a separate error stream, stderr,
when this is directed by default to the screen, along with stdout?
Because when you use output redirection (">" on Unix and MS/DOS) or piping
of output ("|" on Unix and MS/DOS) you do not usually want to prevent
errors and warnings appearing on the screen.
- Why is it sometimes necessary to use files to store more than printable
characters?
- To store graphics images and page layout files, such as those used by
Microsoft Word or in .dvi files.
- To store the exact values of numbers, as represented in binary form
within the computer. If you print floating point numbers as characters you
usually get rounding errors. Note, however, that binary representations
may not be portable between different types of machine.
Back to the questions.
Back to notes on Input and Output.