#include <stdio.h>

int main(int argc, char **argv)
{

        fputs("Enter a character: ", stdout);
        char my_c ;

        my_c = fgetc(stdin);
        fputc(my_c, stdout);

        char junk;
        do {
                junk = fgetc(stdin);
                printf("    junk: %d %02x %c\n", junk, junk, junk);

        } while (junk != '\n' && junk != EOF);

        char my_s[10];
        puts("enter a string: ");
        fgets(my_s, 10, stdin);

        printf("You entered -->%s<--\n", my_s);
        return 0;
}