What exactly does the below statement do?
const char *string
*string - '0'
Thanks!
It subtracts the value of the character '0' from the character pointed to by string, turning it into a numerical value. So for example the character '9' will be turned into the integer 9.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With