His question is why his code does not compile, and not how to do what he is trying to do.
The reason the row
char c = n
does not compile because the range of char (-2 ^ 15 to 2 ^ 15 - 1) is much less than the interval int (-2 ^ 31 to 2 ^ 31 - 1). The compiler sees that you are trying to assign an int to char and stops you because it implements this.
source share