Save hex file content to a string variable

I need to transfer it to another microcontroller and need the hex format to be saved to string.