In this function to get it to add the value at *i correctly I have to negate char 0. This will probably seem dumb but why do I have to do this for it to work properly?
Code:int sum_digit(char array[200], int *digCount, int *i) { if (array[(*i)] >= '0' && array[(*i)] <= '9'){ (*digCount)+= (int)array[*i]-'0'; return *digCount;} }