prev up next   top/contents search

comp.lang.c FAQ list · Question 1.2

Q: Why aren't the sizes of the standard types precisely defined?

A: Though C is considered relatively low-level as high-level languages go, it does take the position that the exact size of an object (i.e. in bits) is an implementation detail. (The only place where C lets you specify a size in bits is in bit-fields within structures; see questions 2.25 and 2.26.) Most programs do not need precise control over these sizes; many programs that do try to achieve this control would be better off if they didn't.

Type int is supposed to represent a machine's natural word size. It's the right type to use for most integer variables; see question 1.1 for other guidelines. See also questions 12.42 and 20.5.

prev up next   contents search
about this FAQ list   about eskimo   search   feedback   copyright

Hosted by Eskimo North