/* fgetc() example
* 2017-09-02
*/
#include <stdio.h>

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

    fputs("Enter one or more characters: ", stdout);
    c = fgetc(stdin);
    printf("first char-->%c<--\n", c);
    do {
        c = fgetc(stdin);
        printf("    %02x -->%c<--\n", c, c);
    } while (c != '\n' && c != EOF);

    return 0;
}