/* * getputchars.c */ #include int main(void) // header for main function. takes nothing, returns int { char cc; // declare variable cc of type char printf("Enter three characters: "); // prompt user for input cc=getchar(); // read single char from input buffer, or wait for it printf("\nThe first character you enter was: "); // print what will be printed putchar(cc); // print a single character putchar('\n'); // print new line cc = getchar(); // read single char from input buffer, or wait for it printf("\nThe second character you entered was: "); // print what will be printed putchar(cc); // print a single character putchar('\n'); // print new line cc=getchar(); // read single char from input buffer, or wait for it printf("\nThe third character you entered was: "); // print what will be printed putchar(cc); // print a single character putchar('\n'); // print new line return 0; // return 0 to the calling program }