what is dynamic memory allocationthe mechanism of


What is dynamic memory allocation?

The mechanism of allocating needs amount of memory at run time is known as dynamic allocation of memory. Sometimes it is needed to allocate memory at runtime. When we declare array in any program, the compiler allocates memory to hold the array. Now assume the numbers of items are larger than the distinct size then it is not possible to hold all the elements and if we explain an array large enough and data to be stored is less, in that case the allocated memory is wasted leading to a require for dynamic memory allocation. In this mechanism we use a pointer variable to which memory is allocated at run time.

 

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: what is dynamic memory allocationthe mechanism of
Reference No:- TGS0275387

Expected delivery within 24 Hours