what is the use of using linked list and array?

Answer Posted / vaishnavi varadarajan

Use of array: All the elements are lumped together in one
block of memory. Individual elements can be accessed thru
Array index. Random access & Dynamic allocation are
possible.

Use of Linked list: Linked list allocates space for each
element separately in its own block of memory called
a "linked list element" or "node". It gets the overall
structure by using pointers to connect all its nodes
together like the links in a chain. Here the elements of
list can be accessed thru memory address (Since the pointer
stores a reference to another variable)which improves the
efficiency. Size of the list can also be modified (ie) we
can insert/delete elements of the list.

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is this infamous null pointer, anyway?

802


What does double pointer mean in c?

796


Why is c fast?

808


Is javascript based on c?

808


What is difference between %d and %i in c?

922


What is difference between constant pointer and constant variable?

940


When should we use pointers in a c program?

886


When should a type cast be used?

779


How are portions of a program disabled in demo versions?

1022


What is a string?

886


write a program to find out prime number using sieve case?

1869


What does %c mean in c?

854


Explain how do you determine a file’s attributes?

830


what are enumerations in C

933


Why is it important to memset a variable, immediately after allocating memory to it ?

1788