Any attempt to dereference a null or an undefined pointer will normally generate a runtime error. In some versions of C++, however, execution proceeds using some "garbage" memory location, which may obviously produce incorrect results. This is known as the dangling pointer problem.