converting binary file hex values to ascii
I am able to read binary file and print bytes. When I print using %d format it prints decimal value. When I use %c format it prints junk.
As an example the binary file looks like this: A9D1CA....
As I print each unsigned char byte with %d format I get values like: 169, 209, 203 and so forth. These are decimal valuees. If I print it with %c format then I get junk on the screen.
How can I print this the Hex values in ascii on the console?
Re: converting binary file hex values to ascii
%c prints characters. Hex values are done with %x.
|All times are GMT +5.5. The time now is 19:01.|