#include<stdio.h>
#include<string.h>
#include<stdlib.h>
struct node
{
int n;
struct node *ptr;
};
int main(void)
{
struct node *n1,*strt,*temp;
char a;
int cnt=0,i=0;
//char a[50],temp[100],line[100],word[50],e[50],final[100];
//FILE *fp,*fp1,*fp2;
strt=malloc(sizeof(struct node));
strt->n=90;
strt->ptr=NULL;
for(a='y';a!='n';)
{
n1=malloc(sizeof(struct node));
n1->n=++cnt;
n1->ptr=strt;
strt=n1;
scanf("%c",&a);
}
// ptr[1]=40;
// ptr[2]=30;
n1=strt;
while(n1!=NULL)
{ printf("\n %d at loc %p",n1->n,n1);
printf(" locaa %p \n",n1->ptr);
n1=n1->ptr;
}
return 0;
}
~
~
~
In C programming, a double linked-list refers to a linked data structure that contains a set of links that have been linked sequentially.
Which of the following data structures can be randomly accessed giving loc?A. linked list implemented using arrayB. singly linked listC. double linked listD. both single and double linked listThe answer is A.
You copy a singly linked list into a doubly linked list by iterating over the singly linked list and, for each element, calling the doubly linked list insert function.
Use a linked-list.
void pointer
#include<iostream.h>
write a c program to circular queue
You'll need to use a doubly-linked circular list, since otherwise when you pop off the tail element you'll need to whizz all the way round the list to find its predecessor. See the links section for an implementation of a doubly-linked circular list.
In C programming, a double linked-list refers to a linked data structure that contains a set of links that have been linked sequentially.
list any six consteations
for all datastructure ,c,c++ programs just visit codingdatastructure.blogspot.com and found on blog archive..
Not in C, no.
sorry
A linked list is a collection of items, often nodes, that are sequentially linked by some kind of index or pointer contained within each item.
Which of the following data structures can be randomly accessed giving loc?A. linked list implemented using arrayB. singly linked listC. double linked listD. both single and double linked listThe answer is A.
yes
A node is an object in some kind of linked structure, such as a linked list or tree. Nodes can be allocated off of the free list and added to the linked list or tree at hand, and then filled in with the data needed to represent some piece of information. Conversely, they can be unlinked from the linked list or tree, and then returned to the free list when they are no longer needed. Often, there is no direct variable of pointer in the program's scope that represents the node; rather, the node can be found by traversing a list of linkages, list or tree, in the applicable data structure. There are other definitions of "node", but this is the most common.