Why when we want to convert an ASCII value of a digit into an integer, we need to do:
value - \'0\' ?
And the other way around, to convert Integ
Because the integral values of the digit characters are guaranteed by the C standard to be consecutive.
Therefore '1' - '0' == 1, '2' - '0' == 2, etc. from which you can infer that your formulas really do work.
Sidenotes: