#include #include int f2i (float f) { return *((int *) &f); } // f2i int exponent (float f) { int i = (f2i (f) >> 23) & 255; return i - 127; } // exponent int main (int argc, char *argv[]) { float f = atof (argv[1]); printf ("For float %f, the exponent is %d.\n", f, exponent (f)); return EXIT_SUCCESS; } // main