What is a dangling pointer?

Answer Posted / sumithra.a

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

Is This Answer Correct ?    16 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is purpose of new operator?

589


How can virtual functions in c++ be implemented?

604


Is swift faster than c++?

557


In which situation the program terminates before reaching the breakpoint set by the user at the beginning of the mainq method?

581


what are the characteristics of Class Members in C++?

586






Which is not a valid keyword a) public b) protected c) guarded

732


How would you implement a substr() function that extracts a sub string from a given string?

557


Do you know what are static and dynamic type checking?

612


What do you mean by translation unit?

593


Is swift better than c++?

531


What are the uses of typedef in a program?

604


Is c++ the most powerful language?

558


Why do we use using namespace std in c++?

595


What is the operator in c++?

614


Is c the same as c++?

556