#include main() { char c; printf(" enter a character, you will get the ASCII code\n"); for (; (c = getchar()) != EOF ;) printf(" char %c -> ascii : 0x%x\n", c, c); }