why does this printf("%d\n", unpack ("h", "F")); produce '6' on my system?The unpack ("h", "F")); says 'Convert the letter capital-F into a hex-string, low byte first'. The hex for that letter is '46'. The low byte is '6'. You're printing an integer, and seeing it displayed.
In reply to Re: Mysteries of unpack
by apl
in thread Mysteries of unpack
by atypic
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |