12 .DMA - Stack & Heaps
12 .DMA - Stack & Heaps
Delete Operator
To de-allocate a memory p, we pass its address to the delete() function.
New Operator:
New operator is used to allocate a block of memory of the given data type.
Dangling Pointer
If the memory location pointed by the pointer gets freed/ deallocated, then the
pointer is known as the Dangling Pointer.
Practise Question:
1. Declare a 2D array Dynamically.
2. Declare a 3D array Dynamically.
3. MCQs on Dynamic Memory Allocation.