See Appendix A, Exercise Answers for answers.
Modify the program from the previous exercise so that each file specified on the command line has its lines individually reversed. (Yes, you can do this with only what's been shown to you so far, even excluding the stroll in Chapter 1, Introduction.)
Write a program that reads a list of strings on separate lines, and prints the strings in a right-justified 20-character column. For example, inputting
good-bye, right-justified in a 20-character column. (Be sure your program is actually using a 20-character column, and not a 21-character column. That mistake is common.)
Modify the program from the previous exercise to allow the user to select the column width. For example, entering
good-bye should do the same thing as the previous program did; but, entering
good-bye should justify
good-bye in a 30-character column.