answersLogoWhite

0

To input a decimal number and display in hex, something like:

char buffer[99];

fgets(buffer, 98, stdin);

printf("%x", aoti(buffer));

would be the required core code. Needless to say, there is no error checking, mug trapping, etc. Or if you require the hex in a char[], then replace "printf(" by "sprintf(pointer_to_bufffer,"

User Avatar

Wiki User

14y ago

What else can I help you with?