what is the use of using linked list and array?
Answers were Sorted based on User's Feedback
Answer / rani
Linked list has an overhead cost of maintaining reference
pointers it uses. They too consume lot of memory. And this
cost is more in case of doubly linked lists.
Linked lists always provide sequential access. While arrays
give random access.
| Is This Answer Correct ? | 6 Yes | 2 No |
Answer / 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 |
Answer / pradeep singh bahdari
it is not possible to declare variables for each and every
data items in the memory it takes too much time and
increases the size of code and it will be cumbersome to use
these variables
| Is This Answer Correct ? | 2 Yes | 1 No |
Answer / ananth
By using the linked list we can allocate definite memory
space for variables.But in array cannot allocate definite
memory space.
| Is This Answer Correct ? | 3 Yes | 3 No |
Answer / m.madhu sudhan
we can decrease our time complexcity and allocate
[particular memory place for give variable,this is not
possible in the arrays.this is my ans.......
| Is This Answer Correct ? | 1 Yes | 1 No |
Answer / raj
in linked list reduse time complexit,we can easily delete
element from thaa list,it dynamicaly allocating the memory
in array it will use wast memory for declaration ex arr[50]
u r going to declare only 10 elements then it is waste of
memory......... but for search array is good it can easly
go which element u r give for search..........
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / kunal
because they decrease the time complexity of the program we
have to do.
| Is This Answer Correct ? | 1 Yes | 2 No |
Answer / manju
In Linked list we can insert or delete the elements at any
position,which is not possible in arrays and arrays are of
fixed size,but linked lists are not have a definite length.
we can dynamically allocate the size of linked list with
out wastage of memory...
| Is This Answer Correct ? | 4 Yes | 5 No |
Answer / harsh srivastava
Linked List and array both are used continuous allocation of
memory. When we want to assign too many same type of data
sequentially into memory, at that time we use the Linked
list and array because taking separate variable for each
data is tedious and time consuming so we use the Linked list
and arrays.
| Is This Answer Correct ? | 2 Yes | 3 No |
#define FALSE -1 #define TRUE 1 #define NULL 0 main() { if(NULL) puts("NULL"); else if(FALSE) puts("TRUE"); else puts("FALSE"); }
without using arithmatic operator convert an intger variable x into x+1
what would be the output of the follwing struct st { char name[20]; int i; float f; }; main() { struct st emp = {"forum"}; printf("%d %f",emp.i,emp.f); }
Is there a way to have non-constant case labels (i.e. Ranges or arbitrary expressions)?
write a own function to compare two strings with out using stringcomparition function?
What is the condition that is applied with ?: Operator?
write a c program for print your name .but,your name may be small letter mean print a capital letter or your name may be capital letter mean print a small letter .example \\enter ur name : sankar The name is: SANKAR (or) enter your name:SAnkar The name is:saNKAR
What are the basic data types associated with c?
what is the diffrenet bettwen HTTP and internet protocol
explain what is an endless loop?
What is the difference between functions getch() and getche()?
C program to find all possible outcomes of a dice?