Dear Tujare, 1. I'm no pointer specialist, but I suspect, first and foremost, null pointer is a misnomer, because a pointer always points to something.
Let's remember a pointer is, per se, also an object, only carrying the address of another object. Pointing to an address is one thing, but pointing to an object is another thing. It's up to the compiler, I think, to choose where a null pointer should point to. A null pointer is something pointing to no object? 2. Wouldn't a void pointer point to a known address in memory that you don't know (or doesn't matter) what lies there? Mind, malloc() and family points to an unspecified, but known, block of memory and that's why it gives you a void pointer. It's your turn to decide what to make with it, if you need to, casting it to an appropriate type, perhaps, all according to your convenience. Best, Geraldo --- In [email protected], "tujare_raj1" <tujare_r...@...> wrote: > > can anyone tell me what is difference between void pointer & null pointer? >
