I am reading a C book, and there is a text the author mentioned:
\"if ch (a char variable) is a signed type, then storing 255 in the ch variable gives it the
Try it in decimal. Suppose we can only have 3 digits. So our unsigned range is 0 - 999.
Let's see if 999 can actually behave as -1 (signed):
42 + 999 = 1041
Because we can only have 3 digits, we drop the highest order digit (the carry):
041 = 42 - 1
This is a general rule that applies to any number base.