/**************************************************************************** * 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(int argc, char * argv[]) { int i; /* display mapping for uppercase letters */ for (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 (i = 97; i < 97 + 26; i++) printf("%c: %d\n", (char) i, i); }