Before the first printf, add the following line and show us the new complete output:
Code:
printf("sizeof(int)=%d; sizeof(float)=%d\n", sizeof(int), sizeof(float) );
But basically, this is because you're not using the correct format codes. Use %d for int AND NOTHING ELSE, and use %f for float AND NOTHING ELSE. They must match, otherwise you get undefined behaviour.