what is the difference between arrays and linked list
Answer Posted / shruti
the main differance between arrays and linked list is:
In array we follow static memory allocation.
i.e we assign memory to the particular element in advance.
in linked list -> dynamic memory allocation.
i.e we assign memory to the particular element at run-time..
hence we reserve only the amount of memory which is
required.
there is no problem of memory shortage or wastage, in
linked list. which we very frequently come accross in the
arrays..
| Is This Answer Correct ? | 137 Yes | 21 No |
Post New Answer View All Answers
What happens if header file is included twice?
Do you know pointer in c?
Tell us the use of fflush() function in c language?
What is storage class?
What is function prototype in c language?
What is the sizeof () operator?
What is c language & why it is used?
When is a “switch” statement preferable over an “if” statement?
int main() { Int n=20,i; For(i=0;i<=n;i--) { Printf(“-“); Return 0;
How can I avoid the abort, retry, fail messages?
What is a wrapper function in c?
any C program contains only one function, it must be a) void () b) main () c) message () d) abc ()
Can a function be forced to be inline? Also, give a comparison between inline function and the C macro?
The performance of an operation in several steps with each step using the output of the preceding step a) recursion b) search c) call by value d) call by reference
What is putchar() function?