The short answer
Read the historical record, work through the invented example, then identify which conclusions depend on the example’s assumptions.
Read the distinctions
Count elements, then calculate displacement
Compare the kind of statement being made before treating two claims as equivalent.
| Question | Element offset | Displacement in the invented layout |
|---|---|---|
| Fourth char | 3 | 3 units |
| Fourth int, size 2 | 3 | 6 units |
| Fourth int, size 4 | 3 | 12 units |
Chronology
A timeline of the turning points
Experimental transition
Ritchie began adding a character type to B.
A development account, not a timeless specification
In his 1993 retrospective, Ritchie contrasts B’s word-oriented model with the byte-addressed PDP-11. His experimental NB added char and int, with pointer arithmetic scaled by the referred-to type. The account describes a design transition rather than prescribing one universal integer size.
The 1974 Unix paper independently dates the system’s C rewrite to summer 1973. A language’s design and an operating system’s implementation can influence each other without becoming the same object.
Arrays required another decision
Ritchie explains that an early array representation stored a pointer cell. Embedding arrays in structures exposed difficulties. C’s solution instead created a pointer value when an array appeared in an expression, avoiding that extra stored cell.
This historical explanation is narrower than a complete language specification. It helps identify the problem being solved, but it does not licence assumptions about every expression, compiler, layout or later standard. The cited retrospective’s selected passage does not replace those documents.
Sources for this section: [1]
Invented layout and task
Define a teaching machine with numbered address units. A char occupies 1 unit and an int occupies 2 units. A four-element char array starts at 100; a four-element int array starts at 200. Both arrays are contiguous. Define an element step as the size of the pointed-to element, with no padding between array elements. These sizes and addresses are invented.
Find the address of the fourth element in each array, counting the first as element 0. Then explain why adding the same element offset need not add the same number of address units. Finally, change the stipulated int size to 4 units while retaining its starting address. What changes and what remains the same?
Sources for this section: [1]
Reference answer
For the char array, offset 3 gives 100+3×1=103. For the int array, it gives 200+3×2=206. The index is 3 in both cases; the address displacement is 3 units in one case and 6 in the other. Under the revised size, the int address becomes 200+3×4=212. The fourth element is still the element with index 3.
All calculations follow the fixture’s definition of element steps. They do not establish the size of int on any real machine. Nor does the example show that a program using implementation-specific layouts will become portable merely by being written in C. A representation claim requires its own assumptions.
Sources for this section: [1]
Continue the chronology
Related history guides
Biography context
Explore United States through connected lives
Connected biographies
People behind the records
Quick answers
Common questions
- Is int always two address units?
- No. That is an explicit input to the first fictional layout, and the second layout deliberately changes it.
Primary and institutional sources
How this history was checked
The cited records have different dates and purposes. All worked examples are newly invented and are not historical measurements. This article was reviewed on 31 October 2026.
