#include typedef union{ float f; unsigned char c[4]; }IEEE; main(){ float x; IEEE zz; printf("x="); scanf("%f",&zz.f); printf("%f %02x%02x%02x%02x\n",zz.f,zz.c[3],zz.c[2],zz.c[1],zz.c[0]); }