this is an excerpt from a code that counts digits and whitespaces.Code:int c, ndigit[10]; while ((c = getchar()) != EOF) { if (c >= '0' && c <= '9') ++ndigit[c-'0'];
ive asked around about the c-'0' expression and theyre making c = 1. 1 = 49 in ascii. and 0 = 48 in ascii. therefore c-'0' = 1. ive got that much but what i do not understand is there are more than 10 different characters that can be entered upon input. why is "if (c >= '0' && c <= '9')" used in this program when there are more than 10 different characters that can be entered?