I\'ve seen examples of this all over the place:
int i = 2; char c = i + \'0\'; string s; s += char(i + \'0\');
However, I have not yet seen
It's based on ASCII values. Adding the ASCII value of 0 which is 48 means that 48 + 5 will be 53 or ASCII 53 which is 5.
Google ASCII and find a good chart and study it. It should make sense once you look at the values for each char (character).