Why cast to a pointer then dereference? : <p>I was going through this example which has a function outputting a hex bit pattern to represent an arbitrary float. </p>

<pre><code>void ExamineFloat(float fValue)
{
    printf("%08lx\n", *(unsigned long *)&amp;fValue);
}
</code></pre>

<p>Why take the address of fValue, cast to unsigned long pointer, then dereference? Isn't all that work just equivalent to a direct cast to unsigned long?</p>

<pre><code>printf("%08lx\n", (unsigned long)fValue);
</code></pre>

<p>I tried it and the answer isn't the same, so confused. </p>
