/**************************************************************************** * ascii1.c * * Computer Science 50 * David J. Malan * * Displays the mapping between alphabetical ASCII characters and * their decimal equivalents using one column. * * Demonstrates casting from int to char. ***************************************************************************/ #include int main(void) { // display mapping for uppercase letters for (int i = 65; i < 65 + 26; i++) printf("%c: %d\n", (char) i, i); // separate uppercase from lowercase printf("\n"); // display mapping for lowercase letters for (int i = 97; i < 97 + 26; i++) printf("%c: %d\n", (char) i, i); }