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 are c header files?
pierrot's divisor program using c or c++ code
When do you not use the keyword 'return' when defining a function a) Always b) Never c) When the function returns void d) dfd
What is static and auto variables in c?
if a is an integer variable, a=5/2; will return a value a) 2.5 b) 3 c) 2 d) 0
Linked list is a Linear or non linear explain if linear how it working as a non linear data structures
Disadvantages of C language.
What is a void pointer? When is a void pointer used?
Explain goto?
What is extern variable in c with example?
Why are all header files not declared in every c program?
What is the difference between class and object in c?
Is there a way to switch on strings?
What is an arrays?
Why string is used in c?