In the ASCII character set, '1' has the numerical value of 49, and '2' has the numerical value of 50. %d prints the numerical value (which is what you are seeing). %c will print the character...