On 12/22/06, Sunil Nair <[EMAIL PROTECTED]> wrote:

 But *malloc* returns a void pointer to the allocated space, or *NULL* if
there is insufficient memory available.



Indeed.

So anyway the pointer is going to hold some memory ......


Uh-huh...


Correct me if i have interpreted something wrong.


Your original post said a pointer pointed to a variable - I gave two
instances where it didn't. Where's the confusion?


Thanks in advance,

Cheers,
Sunil Nair


*Paul Herring <[EMAIL PROTECTED]>* wrote:

 On 12/22/06, Sunil Nair <[EMAIL PROTECTED]> wrote:
>
>  To be more specific
>
> A pointer is a variable that holds the address of another
> variable................
>

Not always:

int* a, *b;
a = malloc(sizeof *a);
b = 0;

Neither a nor b hold the address of another variable.




 *ed <[EMAIL PROTECTED]>* wrote:
>
>  On Thu, 21 Dec 2006 17:56:56 -0000
> "murder_a2z" <[EMAIL PROTECTED] <murder_a2z%40yahoo.com>> wrote:
>
> > what is pointer and how to use them
> >
> >
>
> a pointer is a value that "points" to some memory.
>
> http://www.lysator.liu.se/c/c-faq/c-2.html
>
>
>



Reply via email to