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 abstract data structure in c?
What will the code below print when it is executed? int x = 3, y = 4; if (x = 4) y = 5; else y = 2; printf ("x=%d, y=%d ",x,y);
write a program that types this pattern: 12345678987654321 12345678 87654321 1234567 7654321 123456 654321 12345 54321 1234 4321 123 321 12 21 1 1
Explain how can you check to see whether a symbol is defined?
a single linked list consists of nodes a to z .print the nodes in reverse order from z to a using recursion
i = 25;switch (i) {case 25: printf("The value is 25 ");case 30: printf("The value is 30 "); When the above statements are executed the output will be : a) The value is 25 b) The value is 30 c) The value is 25 The value is 30 d) none
What are the scope of static variables?
find out largest elemant of diagonalmatrix
The file stdio.h, what does it contain?
disply the following menu 1.Disply 2.Copy 3.Append; as per the menu do the file operations 4.Exit
Write a program for finding factorial of a number.
Where is volatile variable stored?
Why cant I open a file by its explicit path?
Write program to remove duplicate in an array?
How variables are declared in c?