Basic Data Types

All data in C programs is either a constant or variable, and each has an associated data type. The concept of types is common to all high-level languages. For instance, an integer (whole) number has the INTEGER type in QuickBasic, the Integer type in QuickPascal, and the int type in C. This section describes the basic data types in C and explains how to specify variables and constants using these types.

All of the basic data types contain a single value. Types that contain more than one value—arrays, structures, and unions—are called “aggregate types.” We'll discuss aggregate types later in this chapter.