3 ms·
I think you meant int value = c - '0'; Also, remember that sizeof("string") includes the null terminator while strlen() does not.
by mansr 15y ago
I think you meant
int value = c - '0';
Also, remember that sizeof("string") includes the null terminator while strlen() does not.