saving . . . saved data structure non continuous linked list problem... has been deleted. data structure non continuous linked list problem... has been hidden .
data structure non continuous linked list problem...
Title
Question
i have a code that i dont understand partially the code is as follows:-
(Toggle Plain Text)
#include<conio.h>
#include<stdio.h>
struct node
\t{
\t\tint info;
\t\tstruct node *next;
\t};
\ttypedef struct node node;
int main()
{
\tnode n1,n2,n3,n4,*p;
\tp=&n1;
\tn1.info=10;
\tn2.info=20;
\tn3.info=25;
\tn4.info=16;
\tn1.next=&n2;
\tn2.next=&n3;
\tn3.next=&n4;
\tn4.next=NULL;
\twhile(p!=NULL);
\t{
\t\tprintf("%d",p->info);
\t\tp=p->next;
\t}
\tgetch();
}
it says no error but it did not ran......
things i dont understand is -> sign and concept of self refrential (node *next) structure i know how a linked list works but there are these few queries




For more details : teaser trailer

Advance-C General None min None sec 14-11-17, 6:29 p.m. JensenBreck

Answers:

Log-in to answer to this question.