when my calculation outputs it provides an integer converted to a hex number, such as '000f' but I want it to output '000F' I'm sure that I could probably do it using a bitwise operator but have no idea how...
Printable View
when my calculation outputs it provides an integer converted to a hex number, such as '000f' but I want it to output '000F' I'm sure that I could probably do it using a bitwise operator but have no idea how...
Output the hex value to a string (using itoa() if necessary) and use the toupper() function on it. I think that's what it's called.
If you are using printf then use the %X type character. That prints a hex number with big letters.