Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Storage Class Specifiers

You’ve already encountered storage class specifiers that you can place in front of variable names, such as extern and static. Here we’ll discuss more specifiers that give the compiler information about the intended use of a variable in your program.

auto

This keyword is used to declare an automatic local variable, as opposed to a static one. It is the default for a variable declared inside a function or method—but you’ll never see anyone using it. Here’s an example:


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial