Chapter 2. Types
Programs have to store and process different kinds of data, such as integers and floating-point numbers, in different ways. To this end, the compiler needs to know what kind of data a given value represents.
In C, the term object refers to a location in memory whose contents can represent values. Objects that have names are also called variables
. An object's type determines how much space the object occupies in memory, and how its possible values are encoded. For example, the same pattern of bits can represent completely different integers depending on whether the data object is interpreted as signedthat is, either positive or negativeor unsigned, and hence unable to represent negative values.
|