K&R C Exercise 3-4: itoa — Handle INT_MIN in Integer to String
Exercise 3-4. In a two’s complement number representation, our version of itoa does not handle the largest negative number, that is, the value of n equal to −(2wordsize−1). Explain why not. Modify it to print that value correctly, regardless of the machine on which it runs. This exercise has two parts: explain the bug, then …