First error: size_tnot necessary unsigned int, therefore its maximum value may differ from the value unsigned int( UINT_MAX); in addition, in C ++ you should use to get information about type boundaries std::numeric_limits.
#include <limits>
size_t s=std::numeric_limits<size_t>::max();
: ; size_t , , , , , , , , , ; , int, , , UINT_MAX*sizeof(int) , , , 4 - - , , sizeof(arr) wouldn 't , . .
, , , , , , ( ).
: . , , , , ( , , ).
++ , , , , VLA ( C99, ++). (VLA ), ( , , , VLA , VLA = > , , ).
: ( ), . , . , , .