Created 01/14/99; revisions 08/13/99, 01/20/00

CHAPTER 22 --- Reading Data from a File

The previous chapter discussed files and how to send the output of a program to a text file. This chapter discusses how a program can read its input from a text file.

Chapter Topics:

  • Input file redirection.
  • Problems with blank lines.
  • Redirecting both input and output.
  • Numeric input from a text file.
  • Problems with illegal characters in a number.
  • The trim() method.

QUESTION 1:

Where did the data for our previous programs come from?

Click Here after you have answered the question