EDIT: Thanks for the comments - I looked it up in the C99 standard, which says in section 6.5.3.4:
The value of the result is implementation-defined, and its type (an unsigned integer type) is
size_t
, defined in<stddef.h>
(and other headers)
So, the size of size_t
is not specified, only that it has to be an unsigned integer type. However, an interesting specification can be found in chapter 7.18.3 of the standard:
limit of
size_t
SIZE_MAX 65535
Which basically means that, irrespective of the size of size_t
, the allowed value range is from 0-65535, the rest is implementation dependent.