how unsigned integer store negative numbers
View Single Post
By the way, int i=-9 defines a signed integer by default (unless your compiler has a flag that changes that default behaviour). For unsigned integers you need to specify the unsigned keyword, i.e.
unsigned int i=-9;