我正在尝试打印存储在 C 中的浮点数中的数字,我正在努力如何打印出来。我现在正在这样做,它以 IEEE 格式打印数字。我希望它直接从记忆中反向打印。我该如何解决?谢谢
void printbits(size_t n, void *c) {
unsigned char *t = c;
if (c == NULL)
return;
while (n > 0) {
int q;
--n;
for(q = 0x80; q; q >>= 1)
printf("%x", !!(t[n] & q));
}
}