And did you remember to test against 0x5943, rather than 5943?
And did you take Endianness into account? ;-)
How 'bout:
$echo -n "YC" > foo $hd foo 00000000 59 43 |YC| 00000002
(UPDATE: fixed code spacing)
printf("%hx", *(unsigned short *)"YC");
printf("%hx", htons(*(unsigned short *)"YC"));