home *** CD-ROM | disk | FTP | other *** search
- Problem 3: Reverse the characters in a line.
-
- For each line in a file (on the standard input), reverse
- the order of the characters in the line.
-
- There is an unknown, but fairly small (less than ten thousand)
- number of lines in the input file.
-
- Each line is guaranteed to be less than 80 characters long.
-
- For example, if the file on stdin consists of exactly two lines:
-
- hello
- world!
-
- then the output should be
-
- olleh
- !dlrow
-
- on exactly two lines. The byte count of a correct output for the
- example would be 13 (remember that the newlines count as bytes).
- The blank lines in the above listing of the explanation are not
- part of the output. Note that each output line should be left-
- justified (e.g., the ! in the example must come out in column 1).
-
-