Dangling Pointer डेंगलिंग पॉइंटर
A pointer which initially stores the memory address of an object or variable, but after the object is destroyed or the memory is deallocated, the pointer still retains the same address. Such a pointer is called a dangling pointer. सी प्रोग्राम में एक पॉइंटर वेरिएबल जो प्रारंभ में किसी ऑब्जेक्ट या वेरिएबल का मेमोरी एड्रेस स्टोर करता है, परंतु बाद में उस ऑब्जेक्ट के नष्ट हो जाने या मेमोरी डी-एलोकेट हो जाने के बाद भी पॉइंटर में वही पुराना एड्रेस स्टोर रहता है। इस प्रकार के पॉइंटर को डेंगलिंग पॉइंटर (Dangling Pointer) कहा जाता है। A dangling pointer refers to memory that is no longer valid for the original object. If the programmer tries to access or modify the value through this pointer, it results in undefined behavior. It may cause program crashes, unexpected output, or data corruption. डेंगलिंग पॉइंटर ऐसी मेमोरी को पॉइंट करता है जो मूल ऑब्जेक्ट के लिए अब वैलिड नहीं होती है। यदि प्रोग्रामर इस पॉइंटर के द्वारा वैल्यू को एक्सेस या मॉडिफाई करने का प्रयास करता है, तो यह अनडिफाइंड बिहेवियर उ...