Answers for "convert char to single digit"

1

convert char to single digit

char c = '1';
int i = c - '0'; // i is now equal to 1, not '1'
Posted by: Guest on May-28-2021

Code answers related to "convert char to single digit"

Browse Popular Code Answers by Language