Chapter 13. STORAGE CLASSES AND PROGRAM DEVELOPMENT

I l @ ve RuBoard

Chapter 13. STORAGE CLASSES AND PROGRAM DEVELOPMENT

You will learn about the following in this chapter:

  • Keywords

     auto, extern, static register, const, volatile 
  • Function

     rand() 

In this chapter, you learn how C allows you to determine the scope of a variable (how widely known it is) and the lifetime of a variable (how long it remains in existence). Also, you gain experience in designing more complex programs.

One of C's strengths is that it enables you to control a program's fine points. C's storage classes exemplify that control by letting you determine which functions know which variables and for how long a variable persists in a program. Using storage classes is one more element of program design. There is more to programming than just knowing the rules of the language, just as there is more to writing a novel (or even a memo) than knowing the rules of English. In this chapter, we reinforce some of the general principles and concepts of program design introduced earlier. We also develop several useful functions. As we do so, we try to demonstrate some of the general considerations that go into designing a function. In particular, we emphasize the value of a modular approach ”the division of a job into smaller, more manageable tasks .

I l @ ve RuBoard


C++ Primer Plus
C Primer Plus (5th Edition)
ISBN: 0672326965
EAN: 2147483647
Year: 2000
Pages: 314
Authors: Stephen Prata

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net