16
GB
What does the 'delete' operator do when called on a null pointer?
IN
शून्य पॉइंटर पर कॉल करने पर 'डिलीट' ऑपरेटर क्या करता है?
A
Undefined behavior
अपरिभाषित व्यवहार
B
Segfault
सेगफॉल्ट
C
Nothing (safe)
कुछ भी नहीं (सुरक्षित)
D
Throws exception
अपवाद फेंकता है
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English)
The C++ standard guarantees that delete on a null pointer is a no-op; it is safe to delete nullptr.
व्याख्या (हिन्दी)
C++ मानक गारंटी देता है कि शून्य पॉइंटर पर डिलीट करना नो-ऑप है; nullptr को हटाना सुरक्षित है।