I'm trying to write a program that takes input from the user (thats a char) and outputs it to the
monitor in hex form.The program is meant to continuously take input from the user then output to the monitor in hex form until an EOF is detected this triggers the program to close.The following code does this except that I get a lower case 'a' at the end of each output.I think the 'a' has to do with the enter key and if that is the case how can i tell the program to ignore this input from the user. I am noob at programming please help me or at least point me in the right direction.
Thank you.
example:
input from user: ABC
output to monitor: 41 42 43 a
Code:Code:#include <stdio.h> int main(void) { char myChar; while(EOF != (myChar = getchar())) { printf("%x ",myChar); } system("pause"); return 0; }