Software Engineering — MCQ Practice

Hindi aur English dono mein practice karo — click karo answer check karne ke liye

📚 230 Questions 🌐 Hindi + English ✅ Free
भाषा / Language:
230 questions
226
EN + हिं
GB What is 'time-travel debugging' and what class of bugs benefits most from it?
IN 'टाइम-ट्रैवल डिबगिंग' क्या है और किस वर्ग के बग इससे सबसे अधिक लाभान्वित होते हैं?
A
Time-travel debugging resets the system clock to reproduce date-dependent bugs टाइम-ट्रैवल डिबगिंग दिनांक-निर्भर बग को पुन: उत्पन्न करने के लिए सिस्टम घड़ी को रीसेट करता है
B
Time-travel debugging records a complete execution trace allowing the debugger to step backwards as well as forwards through the execution history — most beneficial for bugs where the failure point is far removed from the causal fault (corruption happens at step 1, crash at step 10000) टाइम-ट्रैवल डिबगिंग एक पूर्ण निष्पादन ट्रेस को रिकॉर्ड करता है जो डिबगर को निष्पादन इतिहास के माध्यम से पीछे और साथ ही आगे बढ़ने की इजाजत देता है - उन बगों के लिए सबसे फायदेमंद जहां विफलता बिंदु कारण दोष से बहुत दूर है (भ्रष्टाचार चरण 1 पर होता है, चरण 10000 पर दुर्घटना)
C
Time-travel debugging is only available for JavaScript applications running in Chrome DevTools टाइम-ट्रैवल डिबगिंग केवल Chrome DevTools में चल रहे जावास्क्रिप्ट अनुप्रयोगों के लिए उपलब्ध है
D
Time-travel debugging requires specialised hardware and is not available for software-only systems टाइम-ट्रैवल डिबगिंग के लिए विशेष हार्डवेयर की आवश्यकता होती है और यह केवल सॉफ़्टवेयर सिस्टम के लिए उपलब्ध नहीं है
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Mozilla RR, WinDbg TTD, and UndoDB enable recording + replay with reverse stepping. Classic use: a data structure is corrupted at step 1 but the crash occurs at step 10,000. Traditional debugging: find crash, step backward manually. Time-travel: set watchpoint on the corrupted memory address and run backward — the debugger stops exactly when the corruption occurred. This eliminates one of debugging's hardest problems: tracing effects back to causes across large execution gaps.
व्याख्या (हिन्दी) मोज़िला आरआर, विनडीबीजी टीटीडी, और अनडोडीबी रिवर्स स्टेपिंग के साथ रिकॉर्डिंग + रीप्ले सक्षम करते हैं। क्लासिक उपयोग: डेटा संरचना चरण 1 पर दूषित हो जाती है लेकिन चरण 10,000 पर क्रैश हो जाती है। पारंपरिक डिबगिंग: क्रैश ढूंढें, मैन्युअल रूप से पीछे की ओर कदम बढ़ाएं। समय-यात्रा: दूषित मेमोरी पते पर वॉचपॉइंट सेट करें और पीछे की ओर चलाएं - भ्रष्टाचार होने पर डिबगर ठीक से बंद हो जाता है। यह डिबगिंग की सबसे कठिन समस्याओं में से एक को समाप्त करता है: बड़े निष्पादन अंतरालों के कारण प्रभावों का पता लगाना।
227
EN + हिं Easy
GB What is the 'scientific method' applied to debugging and what specific cognitive error does it prevent?
IN डिबगिंग के लिए प्रयुक्त 'वैज्ञानिक विधि' क्या है और यह किस विशिष्ट संज्ञानात्मक त्रुटि को रोकती है?
A
Scientific method debugging requires formal mathematical proofs of every hypothesised fix वैज्ञानिक विधि डिबगिंग के लिए प्रत्येक परिकल्पित समाधान के औपचारिक गणितीय प्रमाण की आवश्यकता होती है
B
Scientific debugging forms explicit hypotheses, designs a minimal experiment to test each hypothesis, and records results before forming the next — preventing 'shotgun debugging' (making random changes hoping one fixes the bug) which destroys evidence and may mask the real fault वैज्ञानिक डिबगिंग स्पष्ट परिकल्पनाएँ बनाती है, प्रत्येक परिकल्पना का परीक्षण करने के लिए एक न्यूनतम प्रयोग डिज़ाइन करती है, और अगली परिकल्पना बनाने से पहले परिणामों को रिकॉर्ड करती है - 'शॉटगन डिबगिंग' को रोकना (इस उम्मीद में यादृच्छिक परिवर्तन करना कि कोई बग को ठीक कर देगा) जो साक्ष्य को नष्ट कर देता है और वास्तविक गलती को छिपा सकता है
C
Scientific method debugging is only taught in academic computer science courses and not used in industry वैज्ञानिक विधि डिबगिंग केवल अकादमिक कंप्यूटर विज्ञान पाठ्यक्रमों में पढ़ाई जाती है और उद्योग में इसका उपयोग नहीं किया जाता है
D
Scientific debugging requires more time than shotgun debugging and is only used for critical bugs वैज्ञानिक डिबगिंग के लिए शॉटगन डिबगिंग की तुलना में अधिक समय की आवश्यकता होती है और इसका उपयोग केवल गंभीर बग के लिए किया जाता है
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Shotgun debugging: change everything at once and see if it works — this may fix the symptom while leaving the cause intact, or fix by luck while masking a related defect. Scientific debugging: 'My hypothesis: the bug is caused by X. I'll change only X and observe. Result: still broken. New hypothesis: Y.' Each experiment is minimal and isolated, preserving evidence and systematically narrowing the fault location.
व्याख्या (हिन्दी) शॉटगन डिबगिंग: सब कुछ एक बार में बदलें और देखें कि क्या यह काम करता है - यह कारण को बरकरार रखते हुए लक्षण को ठीक कर सकता है, या संबंधित दोष को छिपाते हुए भाग्य से ठीक कर सकता है। वैज्ञानिक डिबगिंग: 'मेरी परिकल्पना: बग एक्स के कारण होता है। मैं केवल एक्स को बदलूंगा और निरीक्षण करूंगा। नतीजा: अभी भी टूटा हुआ. नई परिकल्पना: वाई.' प्रत्येक प्रयोग न्यूनतम और पृथक है, साक्ष्य को संरक्षित करता है और गलती के स्थान को व्यवस्थित रूप से सीमित करता है।
228
EN + हिं Easy
GB What is 'logging correlation ID' pattern in microservices debugging and what distributed tracing problem does it solve?
IN माइक्रोसर्विसेज डिबगिंग में 'लॉगिंग सहसंबंध आईडी' पैटर्न क्या है और यह किस वितरित ट्रेसिंग समस्या का समाधान करता है?
A
Correlation IDs are database primary keys used to track records across multiple tables सहसंबंध आईडी डेटाबेस प्राथमिक कुंजी हैं जिनका उपयोग कई तालिकाओं में रिकॉर्ड को ट्रैक करने के लिए किया जाता है
B
A correlation ID is a unique identifier generated at request entry and propagated through all service calls — solving the problem of matching log entries from Service A, B, C, and D that all processed the same user request across thousands of concurrent requests सहसंबंध आईडी एक अद्वितीय पहचानकर्ता है जो अनुरोध प्रविष्टि पर उत्पन्न होता है और सभी सेवा कॉल के माध्यम से प्रचारित होता है - सेवा ए, बी, सी और डी से मिलान लॉग प्रविष्टियों की समस्या को हल करता है जो सभी हजारों समवर्ती अनुरोधों में एक ही उपयोगकर्ता अनुरोध को संसाधित करते हैं
C
Correlation IDs are only needed when services are deployed in different cloud regions सहसंबंध आईडी की आवश्यकता केवल तभी होती है जब सेवाएँ विभिन्न क्लाउड क्षेत्रों में तैनात की जाती हैं
D
Correlation IDs are automatically added by all cloud load balancers and require no developer action सहसंबंध आईडी सभी क्लाउड लोड बैलेंसर्स द्वारा स्वचालित रूप से जोड़े जाते हैं और किसी डेवलपर कार्रवाई की आवश्यकता नहीं होती है
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Without correlation IDs, microservice logs look like: '[10:00:01] Service A: processing request' and '[10:00:01] Service C: database error' — which request triggered the DB error? With correlation ID 'req-7f3a': '[10:00:01][req-7f3a] Service A: processing' and '[10:00:01][req-7f3a] Service C: database error' — you can filter all logs for req-7f3a to see the complete request journey. OpenTelemetry standardises this propagation.
व्याख्या (हिन्दी) सहसंबंध आईडी के बिना, माइक्रोसर्विस लॉग इस तरह दिखते हैं: '[10:00:01] सेवा ए: प्रसंस्करण अनुरोध' और '[10:00:01] सेवा सी: डेटाबेस त्रुटि' - किस अनुरोध ने डीबी त्रुटि को ट्रिगर किया? सहसंबंध आईडी 'req-7f3a' के साथ: '[10:00:01][req-7f3a] सेवा A: प्रसंस्करण' और '[10:00:01][req-7f3a] सेवा C: डेटाबेस त्रुटि' - आप संपूर्ण अनुरोध यात्रा देखने के लिए req-7f3a के लिए सभी लॉग फ़िल्टर कर सकते हैं। ओपनटेलीमेट्री इस प्रसार को मानकीकृत करती है।
229
EN + हिं Easy
GB What is 'memory debugging' with AddressSanitizer (ASan) and what categories of bugs does it detect that valgrind also detects?
IN एड्रेससैनिटाइज़र (एएसएएन) के साथ 'मेमोरी डिबगिंग' क्या है और यह किस श्रेणी के बग का पता लगाता है जिनका वेलग्रिंड भी पता लगाता है?
A
ASan only detects memory leaks; valgrind only detects null pointer dereferences ASan केवल मेमोरी लीक का पता लगाता है; वालग्रिंड केवल शून्य सूचक डीरेफ़रेंस का पता लगाता है
B
Both ASan and Valgrind detect: use-after-free, heap buffer overflows, stack buffer overflows, use of uninitialised memory — ASan is 2x slower than uninstrumented code; Valgrind is 10-50x slower, making ASan more practical for CI use while Valgrind offers more detailed analysis ASan और Valgrind दोनों पता लगाते हैं: उपयोग-बाद-मुक्त, हीप बफ़र ओवरफ़्लो, स्टैक बफ़र ओवरफ़्लो, अनइनिशियलाइज़्ड मेमोरी का उपयोग - ASan अनइंस्ट्रूमेंटेड कोड की तुलना में 2x धीमा है; वैलग्रिंड 10-50x धीमा है, जो सीआई उपयोग के लिए एएसएएन को अधिक व्यावहारिक बनाता है जबकि वैलग्रिंड अधिक विस्तृत विश्लेषण प्रदान करता है
C
ASan can only instrument programs compiled with GCC; Valgrind works with any executable एएसएएन केवल जीसीसी के साथ संकलित कार्यक्रमों को लिख सकता है; वालग्रिंड किसी भी निष्पादन योग्य के साथ काम करता है
D
Memory debugging tools are only needed for programs over 100,000 lines of code मेमोरी डिबगिंग टूल की आवश्यकता केवल 100,000 लाइनों से अधिक कोड वाले प्रोग्राम के लिए होती है
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Use-after-free: access memory after free(). Heap overflow: write past end of malloc'd buffer. Stack overflow: write past end of stack array. Valgrind's Memcheck instruments at binary level (no recompile) with very detailed output but 10-50x overhead. ASan compiles instrumentation directly into the binary (2x overhead), making it feasible in CI pipelines. Both are essential tools for C/C++ code quality.
व्याख्या (हिन्दी) उपयोग-बाद-मुक्त: मुफ़्त के बाद मेमोरी तक पहुंचें()। हीप ओवरफ़्लो: मॉलोक्ड बफ़र का पिछला अंत लिखें। स्टैक ओवरफ्लो: स्टैक ऐरे का पिछला अंत लिखें। वेलग्रिंड के मेमचेक उपकरण बाइनरी स्तर पर (कोई पुन: संकलन नहीं) बहुत विस्तृत आउटपुट के साथ लेकिन 10-50x ओवरहेड। एएसएएन इंस्ट्रूमेंटेशन को सीधे बाइनरी (2x ओवरहेड) में संकलित करता है, जिससे यह सीआई पाइपलाइनों में संभव हो जाता है। दोनों C/C++ कोड गुणवत्ता के लिए आवश्यक उपकरण हैं।
230
EN + हिं Easy
GB What is 'event sourcing' as a persistence pattern and what audit/debugging advantage does it provide over traditional state storage?
IN दृढ़ता पैटर्न के रूप में 'इवेंट सोर्सिंग' क्या है और यह पारंपरिक राज्य भंडारण पर क्या ऑडिट/डिबगिंग लाभ प्रदान करता है?
A
Event sourcing stores only the current state of an entity, discarding all historical changes इवेंट सोर्सिंग सभी ऐतिहासिक परिवर्तनों को छोड़कर, किसी इकाई की केवल वर्तमान स्थिति को संग्रहीत करती है
B
Event sourcing persists every state-changing event (not just the current state) — providing complete audit trail (every change is recorded with who/when/why), the ability to reconstruct state at any point in history, and the ability to replay events to debug exactly how a corrupted state arose इवेंट सोर्सिंग प्रत्येक राज्य-परिवर्तनशील घटना (सिर्फ वर्तमान स्थिति नहीं) को जारी रखती है - पूर्ण ऑडिट ट्रेल प्रदान करती है (प्रत्येक परिवर्तन को कौन/कब/क्यों के साथ रिकॉर्ड किया जाता है), इतिहास में किसी भी बिंदु पर राज्य को फिर से बनाने की क्षमता, और घटनाओं को फिर से चलाने की क्षमता डीबग करने के लिए कि कैसे एक भ्रष्ट राज्य उत्पन्न हुआ
C
Event sourcing is only applicable to financial systems and cannot be used in other domains इवेंट सोर्सिंग केवल वित्तीय प्रणालियों पर लागू होती है और अन्य डोमेन में इसका उपयोग नहीं किया जा सकता है
D
Event sourcing eliminates the need for a database since events are stored only in application memory इवेंट सोर्सिंग डेटाबेस की आवश्यकता को समाप्त कर देता है क्योंकि इवेंट केवल एप्लिकेशन मेमोरी में संग्रहीत होते हैं
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Traditional CRUD storage: an account balance is updated in place — once changed, the previous value and the reason for the change are gone unless explicitly logged elsewhere. Event sourcing stores 'AccountCredited($100, reason: refund, timestamp, actor)' as an immutable fact — the current balance is derived by replaying all events. This makes 'why is this balance wrong?' answerable by examining the exact sequence of events, and supports time-travel debugging by replaying events up to any point.
व्याख्या (हिन्दी) पारंपरिक सीआरयूडी भंडारण: एक खाता शेष स्थान पर अद्यतन किया जाता है - एक बार बदलने के बाद, पिछला मूल्य और परिवर्तन का कारण समाप्त हो जाता है जब तक कि स्पष्ट रूप से कहीं और लॉग इन न किया गया हो। इवेंट सोर्सिंग स्टोर 'अकाउंटक्रेडिटेड ($100, कारण: रिफंड, टाइमस्टैम्प, एक्टर)' को एक अपरिवर्तनीय तथ्य के रूप में संग्रहीत करता है - वर्तमान शेष सभी घटनाओं को दोबारा चलाकर प्राप्त किया जाता है। इससे 'यह संतुलन ग़लत क्यों है?' घटनाओं के सटीक अनुक्रम की जांच करके जवाबदेह है, और किसी भी बिंदु तक घटनाओं को दोबारा चलाकर समय-यात्रा डिबगिंग का समर्थन करता है।
226–230 of 230