On Wed, 24 Apr 2002, Neeraj wrote: > This is from "http://www.faqs.org/faqs/C-faq/faq/" - > > <snip> > > According to the language definition, a constant 0 in a pointer > context is converted into a null pointer at compile time.That > is, in an initialization, assignment, or comparison when one > side is a variable or expression of pointer type, the compiler > can tell that a constant 0 on the other side requests a null > pointer, and generate the correctly-typed null pointer value. > > </snip> <stuff deleted/> > PS : Anybody having copy of the ANSI C-standard may throw some light on > it pleasezzzzzzzz..... ! :) I don't have the ANSI C spec, but I'm going to assume that it agrees with K&R on this (yeah, I know. I should never assume). K&R (2nd edition) explicitly state that the null pointer and the integer "0" are interchangeable. Regards, Paul Gearon Software Engineer Telephone: +61 7 3876 2188 Plugged In Software Fax: +61 7 3876 4899 http://www.PIsoftware.com PGP Key available via finger Catapultam habeo. Nisi pecuniam omnem mihi dabis, ad caput tuum saxum immane mittam. (Translation from latin: "I have a catapult. Give me all the money, or I will fling an enormous rock at your head.") -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/