Question:

The pointer that points to a memory location that has been already deallocated is known as:

Show Hint

Which pointer keeps an address after that memory has been freed?
Updated On: Jul 2, 2026
  • Null pointer
  • Dangling pointer
  • Generic pointer
  • Wild pointer
Show Solution
collegedunia
Verified By Collegedunia

The Correct Option is B

Solution and Explanation

Step 1: Recall what happens when memory is freed. When you call free() on a heap block, that memory is returned to the system, but the pointer variable still holds the old address.

Step 2: A pointer that still holds the address of memory that has already been released is called a dangling pointer. Using it leads to undefined behavior.

Step 3: Compare the other choices. A null pointer points to nothing (address 0). A generic pointer is a void pointer with no fixed type. A wild pointer is an uninitialized pointer that was never assigned a valid address.

Step 4: Only the dangling pointer matches the description of pointing to already deallocated memory. The answer is Dangling pointer (option B).
Was this answer helpful?
0
0