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 is the use of typedef in structure in c?
What is the difference between fread and fwrite function?
What is the advantage of using #define to declare a constant?
The number of bytes of storage occupied by short, int and long are a) 2, 2 and 4 b) 2, 4 and 4 c) 4, 4 and 4 d) none
Which one would you prefer - a macro or a function?
Explain what is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?
What is union and structure?
‘ C’ PROGRAME TO SHOW THE TYPE OF TRANGLE BY ACCEPTING IT’S LENGTH .
Is r written in c?
What is the benefit of using an enum rather than a #define constant?
What are structure types in C?
What does *p++ do? What does it point to?
Explain goto?
What is maximum size of array in c?
Dont ansi function prototypes render lint obsolete?