I have an unsigned char that I want to convert to hexadecimal. I know printf("%02X", char) gives me the output I want, but it is sent to the terminal and is thus of little use. How can I convert the character to hexadecimal and store it in a variable the same way printf does it?
I have an unsigned char that I want to convert to hexadecimal. I know
Share
Use
sprintfinstead into a buffer, for example