Try:
printf("0x%08x\n", myFloat);
This should work for a 32-bit variable in order to display it in hexadecimal format. I have never tried using this technique to see a 64-bit variable, but I think this is:
printf("%016llx\n", myDouble);
EDIT: The 64-bit version has been tested, and it definitely works on Win32 (I seem to recall the need for a capital LL on GCC .. maybe)
EDIT2: if you really want to use the binary, you are best off using one of the other answers to get the version of your doubling uint64_t and then the loop:
for ( int i = 63; i >= 0; i-- ) { printf( "%d", (myUint64 >> i ) & 1 ); }
source share