/* -------------------------------------------------------------- */ /* This program will help you understand the difference betweeen */ /* integer and character data types. */ /* -------------------------------------------------------------- */ /* Preprocessor Directives */ #include /* Main Function */ int main(void) { /* Declare and initialize variables */ char c = 'e'; int i = 97; printf("\n"); /* Print the stored values. */ printf("The variable 'c' is currently storing the letter: %c.\n",c); printf("The variable 'i' is currently storing the integer: %i.\n",i); printf("\n"); /* Print both values as ASCII characters. */ printf("The value of the variable 'c' as a character is: %c. \n",c); printf("The value of the variable 'i' as a character is: %c. \n",i); printf("\n"); /* Print both values as integers. */ printf("The value of the variable 'c' as an integer is: %i. \n",c); printf("The value of the variable 'i' as an integer is: %i. \n",i); printf("\n"); /* Exit program */ return(0); } /* --------------------------------------------------------------- */