Next: , Previous: , Up: GNU C Manual   [Contents][Index]


3 Storage and Data

Storage in C programs is made up of units called bytes. A byte is the smallest unit of storage that can be used in a first-class manner.

On nearly all computers, a byte consists of 8 bits. There are a few peculiar computers (mostly “embedded controllers” for very small systems) where a byte is longer than that, but this manual does not try to explain the peculiarity of those computers; we assume that a byte is 8 bits.

Every C data type is made up of a certain number of bytes; that number is the data type’s size. See Type Size, for details. The types signed char and unsigned char are one byte long; use those types to operate on data byte by byte. See Signed and Unsigned Types. You can refer to a series of consecutive bytes as an array of char elements; that’s what a character string looks like in memory. See String Constants.