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

Review Questions

You'll find answers to the review questions in Appendix A, “Answers to the Review Questions.”

1:Which data type would you use for each of the following kinds of data?
  1. The population of East Simpleton

  2. The cost of a movie on DVD

  3. The most common letter in this chapter

  4. The number of times that the letter occurs in this chapter

2:Why would you use a type long variable instead of type int?
3:What portable types might you use to get a 32-bit signed integer, and what would the rationale be for each choice?
4:Identify the type and meaning, if any, of each of the following constants:
  1. '\b'

  2. 1066

  3. 99.44

  4. 0XAA

  5. 2.0e30

5:Dottie Cawm has concocted an error-laden program. Help her find the mistakes.
 include <stdio.h> main ( float g; h; float tax, rate; ...

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