Storage Classes and Scope

This chapter examines the various ways that data are made available to your programs. The concepts presented in this chapter are important because inadvertent access to a program's data is a frequent source of program bugs. As a general rule, you want to restrict the access to a piece of data as much as possible. That way, inadvertent changes to the data are less likely, resulting in programs that have fewer bugs.

Hiding Your Program Data

What's the big deal about hiding data in a program? After all, if you hide the data “completely,” nothing could ever change the data and the state of the program would never ...

Get Beginning C for Arduino: Learn C Programming for the Arduino and Compatible Microcontrollers now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.