Computer Science, asked by kuoj3336, 1 year ago

A pointer pointing to a memory location of the variable even after deletion of the variavle is known as _____

Answers

Answered by qwcricket10
0

A dangling pointer is a pointer pointing to a memory location of the variable even after the deletion of the variable.

  • For keeping the memory address of the variables used in programming is the pointer used.
  • When the variable is deleted but did not update the pointer value then that pointer acts as a dangling pointer.
  • The object the dangling pointer points to is not valid.
  • When a variable in a particular address is deleted or that memory is freed then the pointer pointing to that address is known as a dangling pointer.
Answered by vinod04jangid
0

Answer:

dangling pointer

Explanation:

Dangling Pointer is a pointer that keeps pointing to a memory location that has been freed or deleted. It occurs at the time of the object destruction when the object is deleted from the memory without modifying the value of the pointer. In such case, the pointer is pointing to the memory, which is de-allocated.

There are ways to avoid such problems by assigning NULL to the pointer when the memory gets de-allocated or by using static variables.

#SPJ2

Similar questions