I’m writing a C/C++ program that involves putting a hex representation of a number into a string and I’m confused as to how \x works. I’ve seen examples where people have written things such as “\xb2”. In this case, how does the program know if you want the hex of b followed by the number 2 or if you want the hex of b2? Additionally, when it stores this into memeory does it save the “\x” characters or does it just save the hex representation?
I’m writing a C/C++ program that involves putting a hex representation of a number
Share
From the C99 standard (6.4.4.4):