append (NODE **q, int num) .... HELP

Status
Not open for further replies.

iinfi

mekalodu
in data structures using C ...

while adding a node @ the end of a link list

e.g
append (NODE **q, int num)


what does **q stand for ???

*q is the "address pointer" of the parameter passed ....
but what is **q
 

theKonqueror

CCIE# 20863
**q stands for a pointor to a pointor.
i.e.

int i *p, **q;
p = &i;
q = &p;

Hope this will clear ur concept. Or Try 'Let Us C' from Kanetkar.
 
OP
iinfi

iinfi

mekalodu
Thanks a lot

Thanks a lot for ur help

if i want to display the "memory address" of a variable or pointer then whats the command in C?

is it
printf("%s",&p)

its not working but...
 

lamrinnirmal

Journeyman
firstly boy, to print a string use "%p"
now try out this code:
Code:
    char *s="hi";
    char *p="cu";
    printf("%p",&s);
    printf("%p",&p);
 
Status
Not open for further replies.
Top Bottom