Why the ASCII value of a digit character is equal to the value plus '0'?

前端 未结 5 847
挽巷
挽巷 2020-12-11 19:16

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

5条回答
提交回复
热议问题