answersLogoWhite

0


Best Answer

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
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the C program to convert a decimal number to hexadecimal number?
Write your answer...
Submit
Still have questions?
magnify glass
imp