What is linked list? Explain with example program

Showing Answers 1 - 6 of 6 Answers

ritesh parkhi

  • Mar 3rd, 2007
 

Link list is collection of nonpreemtive data types .Link list contain a node with two parts ,one determines data field and another define the address field which contain the address of next node... Example of linklist is ..Computer in which suppose we would like to open songs and it is reside in F drive ..so weopen My computer ..it shows $ drives after that we select F drive and in last we select song..

Program og link list is...->

typedef struct linklist
{
int data,
struct linklist * next;
}node;
node * first,*temp,*ttemp;
void  creat first node(int val)
{
first=(node *)malloc(size of (node));
first ->data=value;
first ->next=null;
}

  Was this answer useful?  Yes

mohammed umer farooq

  • Mar 9th, 2007
 

Link list is a dynamic data structure for storing different type of data which may be primitive data types or user defined data types like structs and classes..Link list always contain the data types which are to be stored in the linked list and a pointer which will be pointing to the next node in the list if it exists..moreover there are diffferent type of link lists. ie singly link list,doubly linked list,circular linked list etc. which are used for specific data storage functionalites

regards
Mohammed

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions