What's the difference between a linked list and an array?
Answers were Sorted based on User's Feedback
Answer / paridhi
An array is simply a collection of variables of similar
datatype while a linklist is a collection of nodes where
each node is a combination of a data value and pointer to
another record.
Is This Answer Correct ? | 30 Yes | 0 No |
Answer / shatul
an array allocates continous memory allocation whereas a
linked list does not allocates continous memory,
Is This Answer Correct ? | 22 Yes | 4 No |
Answer / div
In an array elments accessing is easy. Accessing time of
1st element and 1000th element is same,but not in linked lists.
Is This Answer Correct ? | 14 Yes | 1 No |
Answer / shilpa
array is static ,where we need to intialize the size in
starting , but linkelist is dynamic , we can dynamically
add the any variable in to the list
Is This Answer Correct ? | 15 Yes | 3 No |
Answer / valli
Array is statically allocated group. Linked list is
dynamically allocated group.
Is This Answer Correct ? | 11 Yes | 2 No |
Answer / santosh
in array we are having limted memory size(by intializing the
array size).but in the linked list we dont want to intialize
the size because it is the list of elements.there will many
tyes of linked list,by our requirements we can use any one
of the linkedlist.
Is This Answer Correct ? | 12 Yes | 4 No |
Answer / vikraman85
I accept the answer 2 ,then we can delete the specified
node in the linked list,but the same thing we can't do in
arrays..
Is This Answer Correct ? | 10 Yes | 3 No |
Answer / noopur
We can allocate memory DYNAMICALLY in linked list where as
in array static allocation of memory is there. In array
contiguous memory allocation procedure is there where as in
linked list we can allocatememory where we want.
Is This Answer Correct ? | 7 Yes | 2 No |
Answer / presto
An array is simply a collection of variables of similar
datatype while a linklist is a collection of nodes where
each node is a combination of a data value and pointer to
another record.
Is This Answer Correct ? | 6 Yes | 1 No |
Answer / raja sekhar
In linkedlist,The operations(delete,insert&etc)are eazily
perform.Where as in arrays that is not possible.
Is This Answer Correct ? | 4 Yes | 1 No |
How can I implement opaque (abstract) data types in C? What's the difference between these two declarations? struct x1 { ... }; typedef struct { ... } x2;
show how link list can be used to repersent the following polynomial i) 5x+2
Write a c program to read a positive number and display it in words.? ex: 123=one two three help me....
Suppose we have a table name EMP as below. We want to perform a operation in which, I want to change name ‘SMITH’ from as ‘SMITH JAIN’. Also I want to change the name of the column from ENAME to E_NAME. EMPNO ENAME JOB MGR HIREDATE SAL 7369 SMITH Coder 7902 17-DEC-80 800 7499 ALLEN SALESMAN 7698 20-FEB-81 1600 7521 WARD SALESMAN 7698 22-FEB-81 1250
how to find out the reverse number of a digit if it is input through the keyboard?
Write a program to write a given string in maximum possibilities? i.e str[5]="reddy"; i.e we can write this string in 120 ways for that write a program
Explain what are bus errors, memory faults, and core dumps?
how to TOGGLE Nth bit of variable in a MACRO
Why array is used in c?
What is calloc in c?
What is wrong with this code such that it doesnt produce the input reversed? #include <stdio.h> #include <stdlib.h> #include <string.h> int main(void) { char Space = ' '; char LineOfText; float count; LineOfText = getchar(); while ((LineOfText = getchar()) != '/n'); { count = strlen(LineOfText) - 1; while (count >= 0) { putchar(LineOfText[count]); count--; } } getchar(); return 0; }
What is Memory leakage ?