331
GB
What is 'dead code' in a codebase and why does it present a specific maintenance risk beyond wasted space?
IN
कोडबेस में 'डेड कोड' क्या है और यह व्यर्थ स्थान से परे एक विशिष्ट रखरखाव जोखिम क्यों पेश करता है?
A
Dead code refers to code that is syntactically incorrect and cannot be compiled
डेड कोड उस कोड को संदर्भित करता है जो वाक्यात्मक रूप से गलत है और संकलित नहीं किया जा सकता है
B
Dead code is reachable or referenced code that is never actually executed in any deployment scenario — it misleads maintainers about system scope, may contain security vulnerabilities, and creates ambiguity about whether removing it would break something
डेड कोड पहुंच योग्य या संदर्भित कोड है जिसे वास्तव में किसी भी परिनियोजन परिदृश्य में कभी निष्पादित नहीं किया जाता है - यह सिस्टम स्कोप के बारे में अनुरक्षकों को गुमराह करता है, इसमें सुरक्षा कमजोरियां हो सकती हैं, और इस बारे में अस्पष्टता पैदा होती है कि इसे हटाने से कुछ टूट जाएगा या नहीं
C
Dead code only exists in interpreted languages; compiled languages automatically eliminate it
डेड कोड केवल व्याख्या की गई भाषाओं में मौजूद है; संकलित भाषाएँ इसे स्वचालित रूप से समाप्त कर देती हैं
D
Dead code is always harmless and can safely be ignored without any maintenance impact
डेड कोड हमेशा हानिरहित होता है और इसे बिना किसी रखरखाव प्रभाव के सुरक्षित रूप से अनदेखा किया जा सकता है
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English)
Dead code misleads: a maintainer studying the codebase for a security audit must spend time understanding code that never runs. Security risk: dead code paths may contain vulnerabilities that were 'safe' because unreachable but could become dangerous if accidentally re-enabled by a configuration change. Ambiguity risk: is this code dead because the feature was removed, or because a bug prevents its execution? Removing it requires investigation.
व्याख्या (हिन्दी)
डेड कोड गुमराह करता है: सुरक्षा ऑडिट के लिए कोडबेस का अध्ययन करने वाले अनुरक्षक को उस कोड को समझने में समय बिताना चाहिए जो कभी नहीं चलता है। सुरक्षा जोखिम: मृत कोड पथों में कमजोरियाँ हो सकती हैं जो पहुंच योग्य नहीं होने के कारण 'सुरक्षित' थीं लेकिन कॉन्फ़िगरेशन परिवर्तन द्वारा गलती से पुनः सक्षम होने पर खतरनाक हो सकती हैं। अस्पष्टता का जोखिम: क्या यह कोड इसलिए मृत है क्योंकि सुविधा हटा दी गई है, या क्योंकि कोई बग इसके निष्पादन को रोकता है? इसे हटाने के लिए जांच की जरूरत है.