See Appendix A, Exercise Answers for answers.
Write a program to read a list of filenames, breaking each name into its head and tail components. (Everything up to the last slash is the head, and everything after the last slash is the tail. If there's no slash, it's all in the tail.) Try this with things like /fred, barney, and fred/barney. Do the results make sense?
Write a program to read in a list of numbers on separate lines, and sort them numerically, printing out the resulting list in a right-justified column. (Hint: the format to print a right-justified column is something like
Create a file that consists of sentences, one per line. Write a program that makes the first character of each sentence uppercase and the rest of the sentence lowercase. (Does it work even when the first character is not a letter? How would you do this if the sentences were not already one per line?)