You are reading the newline (10) and the EOF return value of fgetc (-1). Substracting '0' (48) from those yields those negative numbers.
Check if the char if valid, it must be in range ['0','9']
c1 = fgetc(fread);
if(c1 >= '0' && c1 <= '9') {
c1 -= '0';
// ...
}