Why is the maximum size of an array “too large”?
The limit SIZE_MAX / 2 comes from the definitions of size_t and ptrdiff_t on your implementation, which choose that the types ptrdiff_t and size_t have the same width. C Standard mandates1 that type size_t is unsigned and type ptrdiff_t is signed. The result of difference between two pointers, will always2 have the type ptrdiff_t. This … Read more