I have a C code during which I open a file to input a hexadecimal number. Then I want to add the number obtained it to another single digit hexadecimal and finally display the number in hex. e.g. I input AC65E1 and I add E to it and display AC65EF.
Is there a way to do it without going through the conversion to decimal and adding in decimal and then converting back to hexadecimal? If no what is the time-optimum way to do it?
EDIT: I think my question my misinterpreted, I wanted to know if I can use the '+' with Hex? if I couldnt then I would have to use change to decimal to use the '+' operator. Sorry for any mis-typing!
Now I am reading the data from the file into a char hex_num[10];