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


Please Help Members By Posting Answers For Below Questions

What is the value of a[3] if integer a[] = {5,4,3,2,1}?

662


What is #include stdio h and #include conio h?

592


what is the difference between class and unio?

1854


What are multibyte characters?

639


List the difference between a While & Do While loops?

627






What is abstract data structure in c?

517


Do pointers need to be initialized?

556


What does typeof return in c?

633


What is pointer to pointer in c with example?

542


Where are the auto variables stored?

620


which of the following statement is wrong a) mes=123.56; b) con='T'*'A'; c) this='T'*20; d) 3+a=b;

2386


Write a program on swapping (100, 50)

634


What is static and auto variables in c?

555


What is null in c?

594


Why c is called top down?

620