#define AUID 34567
#include <stdio.h>
#include <math.h>
int main() {
float id = AUID;
int floatSize = sizeof(float);
unsigned char *bits;
int i, part2;
int mant = 128;
bits = (unsigned char*) &id;
for (part2 = 0; part2 < sizeof(bits); part2++) {
printf("+");
for(i = 0; i < 8; i++){
if((bits[part2] & mant) > 0){
printf("%d", 1);
}else{
printf("%d",0);
}
mant = mant >>1;
}
mant = 128;
}
printf("%f\n",id);
}
This is the code that I have modified...the output is meant to print out the full mantissa bits of the AUID, and also it's floating point value....where am i going wrong???