Connecting Tech Pros Worldwide Help | Site Map

c program

Newbie
 
Join Date: Sep 2006
Posts: 1
#1: Sep 1 '06
how to perform insertion and deletion operations on stacks and linked lists???
Banfa's Avatar
AdministratorVoR
 
Join Date: Feb 2006
Location: South West UK
Posts: 6,165
#2: Sep 1 '06

re: c program


You do not perform insert/delete operations on the stack (if it exists). Data is allocated from and returned to the stack as required by the framework in making function calls and allocating memory for automatic variables.

Inserting a entry into a linked list will involve locating the items you wish to insert between and re-writing the linking pointers so that the new item is inserted into the list. To delete from the list find the item to delete and manipulate the linking points of the items before and after it in order to remove it from the list.
Dev Dev is offline
Newbie
 
Join Date: Sep 2006
Posts: 3
#3: Sep 5 '06

re: c program


If u want a example u can create a link List . And then Use it as a stack with LIFO Technique.
Reply