Quiz Entry - updated: 2026.07.14
What are the sizes of C data types on 32-bit vs 64-bit machines?
Most types match across 32- and 64-bit, but long and pointers grow from 4 to 8 bytes on a 64-bit machine.
| C Type | 32-bit | 64-bit |
|---|---|---|
| char | 1 | 1 |
| short | 2 | 2 |
| int | 4 | 4 |
| long | 4 | 8 |
| float | 4 | 4 |
| double | 8 | 8 |
| pointer | 4 | 8 |
Tip: On 64-bit systems, long grows to match pointer size. Use int32_t/int64_t from <stdint.h> for guaranteed sizes.