in reply to Mysteries of unpack
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Mysteries of unpack
by ikegami (Patriarch) on Jun 17, 2009 at 14:41 UTC |