Q.no 22. Which of the following are the solutions to dangling pointer problem?
A: Tombstones
B: Locks and keys
C:Both Tombstones and Locks and Keys
D: Heap
Answers
Answered by
0
Answer:
Ans is option B
Explanation:
Ans is Option C
Answered by
0
Answer:
The correct answer of this question is Locks and keys .
Explanation:
Given - The solutions to dangling pointer problem .
When a pointer pointing to a variable falls out of scope or an object's memory is deallocated, a dangling pointer happens.
A dangling pointer refers to a memory region that does not exist. Dangling pointers occur when an object is deleted or deallocated without changing the pointer's value, resulting in the pointer continuing pointing to the deallocated memory location.
Similar questions