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
Explain with the aid of an example why arrays of structures don’t provide an efficient representation when it comes to adding and deleting records internal to the array.
How can I sort a linked list?
How do you define structure?
Is void a keyword in c?
Read the following data in two different files File A: aaaaaaaadddddddd bbbbbbbbeeeeeeee ccccccccffffffff File B: 11111111 22222222 33333333 By using the above files print the following output or write it in the Other file as follows aaaaaaaa11111111dddddddd bbbbbbbb22222222eeeeeeee cccccccc33333333ffffffffffff
How can you increase the size of a statically allocated array?
What is the acronym for ansi?
What is header file in c?
What is #include stdio h and #include conio h?
How does free() know explain how much memory to release?
Tell us two differences between new () and malloc ()?
what is the structure pointer?
What are header files in c?
What is pointer to pointer in c with example?
How can I dynamically allocate arrays?