----- Original Message -----
From: "agarwal_bajrang" <agarwal_bajrang@yahoo.com>
To: <C-Guru@yahoogroups.com>
Sent: Saturday, May 01, 2004 5:15 PM
Subject: [C-Guru] help needed in c

> Anyone please tell me the difference between NULL and 0 in C.
>

    Note the following points:

    *   NULL is defined as either

            #define NULL 0
        or
            #define NULL (void*)0

        in the header <stddef.h>

    *   Technically, there is no difference between NULL and 0.

    *   Integers and pointers may not be of same size.  On some machines,
        pointers can even be wider than integers!

    *   The only integer value that can portably be assigned to a pointer is
        0; assinging any other integer is implementation-defined.

> When we write const keyword then where this value will stored in
> memory?
>

    Note the following points:

    *   An implementation may choose to place a `const' qualified object into
        the program's read-only area.

    *   No write through the const qualified lvalues.

    *   If the address of an unqualified object, or qualified ONLY by `const',
        is never taken, then the implementation may NOT allocate storage for it.