I\'m a novice in C and I came across the code like this :
int n[10]; if(c>=\'0\' && c<=\'9\') ++n[c-\'0\']
In if
if
This allows to use a char as an index of an array. For example you could define a string "012345", probably read from an external file, and compute for each character c-'0', which will give the integers 0, 1, 2, 3, 4, and 5 respectively.
char
"012345"
c-'0'
0
1
2
3
4
5