New to C and today learned int but confused about the smallest integer as -2^31 = -2147483648.
To my shallow understanding with decimal, for a 4-digit number, its largest is 10^4-1 = 9999 and its smallest -(10^4-1) = -9999. The smallest can’t be -(10^4) = -10000 as it will be 5-digit. (Maybe this is a wrong analogy but this is the closest thing I can relate...)
I must have missed something but failed to think it through. Much appreciated if someone could shed some light here. Thanks!