Forum     

Go Back   Digit Technology Discussion Forum > Portables, Peripherals and Electronics > QnA (read only)
Register FAQ Calendar Mark Forums Read

QnA (read only) Mods please help transfer the contents of this forum to proper sections. :)


 
 
LinkBack Thread Tools Search this Thread Display Modes
Old 06-01-2005, 05:28 PM   #1 (permalink)
mekalodu
 
iinfi's Avatar
 
Join Date: Oct 2004
Location: Navi Mumbai
Posts: 1,519
Default append (NODE **q, int num) .... HELP


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
__________________
mekalodu
iinfi is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 06-01-2005, 05:34 PM   #2 (permalink)
CCIE# 20863
 
Join Date: Dec 2004
Location: Outside the Matrix
Posts: 166
Default

**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.
__________________
Bugs can neither be created nor be removed from software by a developer. They can only be converted from one form to another. The total number of bugs in the software always remain constant.
theKonqueror is offline  
Old 06-01-2005, 09:50 PM   #3 (permalink)
mekalodu
 
iinfi's Avatar
 
Join Date: Oct 2004
Location: Navi Mumbai
Posts: 1,519
Default 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...
__________________
mekalodu
iinfi is offline  
Old 07-01-2005, 03:58 PM   #4 (permalink)
Broken In
 
Join Date: Jan 2004
Location: /bin/sh
Posts: 158
Default

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);
lamrinnirmal is offline  
Old 07-01-2005, 04:56 PM   #5 (permalink)
mekalodu
 
iinfi's Avatar
 
Join Date: Oct 2004
Location: Navi Mumbai
Posts: 1,519
Default Thanks a lot

Thanks A Lot For Ur Help
__________________
mekalodu
iinfi is offline  
Old 07-01-2005, 07:58 PM   #6 (permalink)
Broken In
 
Join Date: Jan 2004
Location: /bin/sh
Posts: 158
Default

sorry it is not to print a string it is to print a pointer
to print a pointer use the format string : "%p"
lamrinnirmal is offline  
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


 
Latest Threads
- by Tenida
- by Charan
- by abhidev
- by Sujeet
- by Sarath

Advertisement




All times are GMT +5.5. The time now is 09:31 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2