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
What is meant by keywords in c?
Where static variables are stored in memory in c?
Why is c used in embedded systems?
Write a program to swap two numbers without using third variable?
What is queue in c?
What is a static function in c?
How do you redirect a standard stream?
int main() { Int n=20,i; For(i=0;i<=n;i--) { Printf(“-“); Return 0;
Can main () be called recursively?
What are the types of data files?
Explain how can I pad a string to a known length?
Explain is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?
What is the scope of local variable in c?
Explain what is page thrashing?
What is bubble sort technique in c?