You are mistaken in your belief that max number for unsigned int is 65535. That hasn't been the case for most compilers since perhaps early days of windows 95 when we had 16-bit processors.
The standards do NOT define the size of any integral type; they only define the relationship of the sizes between one another. (long long >= long >= int >= short >= char... etc) The actual sizes though incredibly common and consistent are defined by the implementation of your compiler and thus are generally platform defined.
That not withstanding most int's use the size of a word on the processor; which today is often 32bits or 64bits.
You could verify 'why' yourself by taking sizeof(int); then raise 2 to that power subtract 1 and you've got your answer for max int...
A better way would be to #include <limits.h> or #include <climits> and use the values it defines.
In C++ you can use std::numeric_limits<unsigned int>::max() as well.
unsigned ints, the max number inunsigned intis definitely bigger than 65535.unsigned intis 65535?