int i;
float *pf;
pf = (float *)&i;
*pf = 100.00;
printf("\n %d", i);

Run program and see

The pioneering spirit appears to be dead, at least among the latest generation of programmers.

int i;
float *pf;
pf = (float *)&i;
*pf = 100.00;
printf("\n %d", i);

Output : 1120403456

int i;
float *pf;
pf = (float *)&i;
*pf = 100.00;
printf("\n %d", i);

i should have write this: explain the output

why not 100 is the output as pf is pointing to i and afterthat we change the value at the address pointed by pf?

You will get 100 if you change your printf() call as follows:

printf("\n%.0f", *pf);

The reason you are not getting 100 with your printf() call is essentially because computers represent floating point numbers and integers differently. The IEEE single-precision floating point format represents a floating point number as a 24-bit mantissa and an 8-bit exponent. So, (float)100.00 is represented differently from (int)100.

In your example, "i" is being used as a buffer to hold the bits for (float)100.0. Your printf() call is displaying that buffer as an integer, my printf() call is displaying that buffer as a float.