Programming Exercises

  1. Redo Review Question 3, but make the argument the spelled-out name of the month instead of the month number. (Don't forget about strcmp().)

  2. Write a program that prompts the user to enter the day, month, and year. The month can be a month number, a month name, or a month abbreviation. The program then returns the total number of days in the year up through the given day.

  3. Revise the book-listing program in Listing 14.2 so that it prints both the book descriptions alphabetized by title and the total value of the books.

  4. Write a program that creates a structure template with two members according to the following criteria:

    1. The first member is a Social Security number. The second member is a structure with three members. Its first ...

Get C Primer Plus®, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.