Logo 
Search:

C++ Programming FAQ

Submit Interview FAQ
Home » Interview FAQ » C++ ProgrammingRSS Feeds

What is a dangling pointer?

  Shared By: Adah Miller    Date: Jan 25    Category: C++ Programming    Views: 88

Answer:

A dangling pointer arises when you use the address of an object after its lifetime is over.
This may occur in situations like returning addresses of the automatic variables from a function or using the address of the memory block after it is freed.

Share: 
 

Didn't find what you were looking for? Find more on What is a dangling pointer? Or get search suggestion and latest updates.


Your Comment
  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].


Tagged: