Dynamic Memory Allocation | Stack Overflow | Dynamic Data Structure

stack overflow


What is dynamic memory allocation?
Ans: The process of allocating in runtime is known as dynamic memory allocation. Its function is - malloc, calloc, free, realloc.

what is stack overflow?
Ans: A stack overflow in an undesirable condition in which a particular computer program tries to use more memory space than the call stack overflow.

Why an array is called a static data structure?
Ans: An array could be called static because it is generally not changed structurally once it is created. We do not add, delete or swap the nodes themselves, though we will likely modify the data contained by the nodes that why array is called static data structure.

Why linked list is called dynamic data structure?
Ans: A linked list is called a dynamic data structure because it's size is flexible another way of phrasing that is you don't have to define the maximum number of elements it is supposed to contain when you create it.

Post a Comment

0 Comments