Dangling pointer:
If any pointer is pointing the memory address of any variable but after some variable has deleted from that memory location while the pointer is still pointing such memory location. Such pointer is known as Dangling pointer and this problem is known as dangling pointer problem.
Initially:
Later: After Removing a
Output:
Initially:
Output: Garbage Value.
After Remove line 7
Output: 26
0 comments:
Post a Comment