Why size_t when int would suffice for the size of an array?
问题 The C standard guarantees that an int is able to store every possible array size. At least, that's what I understand from reading §6.5.2.1, subsection 1 (Array subscripting constraints): One of the expressions shall have type ‘‘pointer to object type’’, the other expression shall have integer type, and the result has type ‘‘type’’. Since we shall use int s as array subscripts, why are we supposed to use size_t to determine the size of an array? Why does strlen() return size_t when int would