#include
#include
struct node
{
int number;
struct node *link;
};
struct node *head;
//struct node *next;
//struct node *prev;
//struct node *key;
void main()
{
node *find(node *p,int a);
int key;
node *n1;
node *p;
printf("ENTER THE NODE TO BE DELETED\n");
scanf("%d",&key);
if(head->number == key)
{
p = head->link;
free(head);
head = p;
}
else
{
n1 = find(head,key);
if(n1 == NULL)
printf("NODE IS NOT FOUND\m");
else
{
p = n1->link->link;
free(n1->link);
n1->link = p;
}
}
}
/* if(first == NULL)
printf("UNDERVLOW\n");
else
{
temp = first;
first = (struct node*)malloc(sizeof(struct node));
while(temp != key && temp->link !=NULL)
{
prev = temp;
temp = temp->link;
if(temp != key)
printf("NODE IS NOT FOUND\n");
else
{
if(key == first)
first = first->link;
else
prev->link = key->link;
key->link = avail;
avail = key;
}
}
}
} */
ShoutBox
Blog Archive
-
▼
2010
(22)
-
▼
January
(22)
- Linklist Node delete program in C
- Link List program in c
- Assembler program in C
- Accessing array in C using pipe
- Fork IPC program in C
- Executing another program in C
- Time program in C
- Sorting Program in C using fork and pipe
- Use of vfork in Unix C program
- Fork and Wait in Unix IPC C program
- Pipes in Unix IPC
- Complete sum program in Unix IPC
- Sort program in C using Unix IPC fork and pipe
- Shared memory in Unix C program
- Sum of N numbers program in C using Fork and Pipe IPC
- Inter process communication with fork and pipe
- Fork and Pipe program in C
- Fork with Pipe Program in C
- Another Fork program in C
- Simple Fork Program in Linux/Unix C
- Recursive File System Search Program in C
- Assembler Program in C
-
▼
January
(22)
Join With Me...
3:29 AM
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment