O'Reilly logo

C Primer Plus, Fourth Edition by Stephen Prata

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 the book descriptions in the order entered, and then alphabetized by title, and then in order of increased value.

  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 Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required