Unsigned int range =0 to 65535
Then your question is if you insert int i =-1; then what value i will printed.
See if you give the value outside the unsigned range .Then it will give result inside the range only .
See how -1 will be represented in 16 bit architecture Simply take 2 s complement
0000 0000 0000 0001
1111 1111 1111 1110
1111 1111 1111 1111
which is 65535 largest unsigned number
similarly for value
unsigned int i=-2 output i=65534
unsigned int i=65536 output i=0