In C, these two code fragments do not necessarily give the same result (assume pointers and longs are the same size):<p><pre><code>   long zero = 0;
   struct IVT * ivt_ptr = (struct IVT *)zero;
</code></pre>
and<p><pre><code>   struct IVT * ivt_ptr = 0;
   &#x2F;* or (struct IVT *)0 if you like that better stylistically *&#x2F;
</code></pre>
The former gives you a pointer whose bits are all 0. The latter gives you a null pointer. On systems where 0 is a valid memory address the compiler should pick some other address that is not valid.<p>Similarly, these two are not necessarily the same:<p><pre><code>    if ( ivt_ptr == 0 ) ...
</code></pre>
and<p><pre><code>    if ( ivt_ptr == (struct IVT *)zero ) ...
    &#x2F;* or if ((long)ivt_ptr == zero ) ... *&#x2F;
</code></pre>
0 only represents the null pointer in C when it is the <i>constant</i> 0.<p>See this for more information: <a href="http:&#x2F;&#x2F;c-faq.com&#x2F;null&#x2F;" rel="nofollow">http:&#x2F;&#x2F;c-faq.com&#x2F;null&#x2F;</a>