Interviews Questions, Algorithms, Aptitude, C Interview Program, C Theory Question, Aptitude Tricks, Test Series,

Tuesday 26 March 2019

Dangling pointer:

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





 C program:





















Output:

Initially:
Output: Garbage Value.


After Remove line 7
Output: 26


                                   


0 comments:

Post a Comment