Data Structures and Algorithms — MCQ Practice

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

📚 1018 Questions 🌐 Hindi + English ✅ Free
भाषा / Language:
1018 questions

Question 16

EN + हिं Medium
GB Which inheritance has two or more children from one parent?
IN किस विरासत में एक माता-पिता से दो या दो से अधिक बच्चे होते हैं?
Multiple विभिन्न
Hybrid हाइब्रिड
Hierarchical श्रेणीबद्ध
Multi-Level मल्टी लेवल
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Hierarchical: two or more child classes from one parent.
व्याख्या (हिन्दी) पदानुक्रमित: एक माता-पिता से दो या दो से अधिक बच्चे वर्ग।
🎯 Exam Perspective
Data Structures and Algorithms के इस प्रश्न को — difficulty level "Medium" कई प्रतियोगी परीक्षाओं जैसे UPSC, SSC, Banking और Police भर्ती में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें।

Question 17

EN + हिं Easy
GB What is hybrid inheritance?
IN संकर वंशानुक्रम क्या है?
Only single type केवल एक ही प्रकार
Combination of more than one inheritance type एक से अधिक वंशानुक्रम प्रकार का संयोजन
Between abstract classes अमूर्त वर्गों के बीच
With static methods only केवल स्थिर तरीकों से
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Hybrid combines multiple inheritance types.
व्याख्या (हिन्दी) हाइब्रिड कई वंशानुक्रम प्रकारों को जोड़ता है।
🎯 Exam Perspective
यह सवाल Data Structures and Algorithms category का है — difficulty level "Easy", और Railway, SSC, Banking और Defence परीक्षाओं के exam pattern में इस तरह के questions common हैं। Answer choose करने के बाद दिया गया explanation जरूर पढ़ें।

Question 18

EN + हिं Easy
GB What does polymorphism mean?
IN बहुरूपता का क्या अर्थ है?
Single form एकल रूप
Multiple forms एकाधिक रूप
Data hiding डेटा छिपाना
Code reusability only केवल कोड पुन: प्रयोज्यता
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Polymorphism = multiple forms — same interface, different behavior.
व्याख्या (हिन्दी) बहुरूपता = एकाधिक रूप - समान इंटरफ़ेस, भिन्न व्यवहार।
🎯 Exam Perspective
यह प्रश्न Data Structures and Algorithms की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है — difficulty level "Easy"। इस तरह के प्रश्न अक्सर SSC, Railway, Banking और State PCS जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें।

Question 19

EN + हिं Easy
GB What is method overriding?
IN मेथड ओवरराइडिंग क्या है?
Multiple methods same name in same class एक ही कक्षा में अनेक विधियों का एक ही नाम
Child redefines parent's method बच्चा माता-पिता की पद्धति को पुनः परिभाषित करता है
Calling method from static context स्थैतिक संदर्भ से कॉलिंग विधि
Using decorators डेकोरेटर का उपयोग करना
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Overriding: child class provides new definition for parent's method.
व्याख्या (हिन्दी) ओवरराइडिंग: चाइल्ड क्लास माता-पिता की विधि के लिए नई परिभाषा प्रदान करती है।
🎯 Exam Perspective
Data Structures and Algorithms से जुड़ा यह सवाल — difficulty level "Easy" उन students के लिए काम का है जो SSC CGL, IBPS, RRB और State-level परीक्षाओं की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो।

Question 20

EN + हिं Medium
GB Which module implements abstraction in Python?
IN कौन सा मॉड्यूल पायथन में एब्स्ट्रैक्शन लागू करता है?
abstract अमूर्त
abc एबीसी
meta मेटा
interface इंटरफ़ेस
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) 'abc' module (Abstract Base Classes) provides abstraction tools.
व्याख्या (हिन्दी) 'एबीसी' मॉड्यूल (एब्सट्रैक्ट बेस क्लासेस) अमूर्त उपकरण प्रदान करता है।
🎯 Exam Perspective
UPSC, SSC, Banking और Police भर्ती जैसी परीक्षाओं में Data Structures and Algorithms से सवाल अक्सर पूछे जाते हैं — difficulty level "Medium"। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें।

Question 21

EN + हिं Easy
GB What is an abstract method?
IN अमूर्त विधि क्या है?
Has body in base class बेस क्लास में बॉडी है
Has no implementation in base class बेस क्लास में कोई कार्यान्वयन नहीं है
Cannot be inherited विरासत में नहीं मिल सकता
Always returns None हमेशा कोई नहीं लौटाता
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Abstract method declared with 'pass' — must be implemented in subclasses.
व्याख्या (हिन्दी) 'पास' के साथ घोषित सार विधि - उपवर्गों में लागू की जानी चाहिए।
🎯 Exam Perspective
अगर आप Railway, SSC, Banking और Defence परीक्षाओं की तैयारी कर रहे हैं, तो Data Structures and Algorithms का यह topic आपके लिए महत्वपूर्ण है — difficulty level "Easy"। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें।

Question 22

EN + हिं Easy
GB What is an abstract class?
IN एक अमूर्त वर्ग क्या है?
Static class स्थैतिक वर्ग
Class with at least one abstract method कम से कम एक अमूर्त विधि वाली कक्षा
Final class अंतिम कक्षा
Singleton class सिंगलटन वर्ग
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Any class with at least one @abstractmethod is abstract.
व्याख्या (हिन्दी) कम से कम एक @abstractmethod वाली कोई भी कक्षा अमूर्त है।
🎯 Exam Perspective
Data Structures and Algorithms के इस प्रश्न को — difficulty level "Easy" कई प्रतियोगी परीक्षाओं जैसे SSC, Railway, Banking और State PCS में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें।

Question 23

EN + हिं Easy
GB What does @property decorator do?
IN @प्रॉपर्टी डेकोरेटर क्या करता है?
Defines static methods स्थैतिक तरीकों को परिभाषित करता है
Access method as attribute without calling कॉल किए बिना विशेषता के रूप में एक्सेस विधि
Marks method abstract मार्क्स विधि सार
Overrides constructor कंस्ट्रक्टर को ओवरराइड करता है
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) @property allows a method to be accessed like an attribute.
व्याख्या (हिन्दी) @property एक विधि को एक विशेषता की तरह एक्सेस करने की अनुमति देता है।
🎯 Exam Perspective
यह सवाल Data Structures and Algorithms category का है — difficulty level "Easy", और SSC CGL, IBPS, RRB और State-level परीक्षाओं के exam pattern में इस तरह के questions common हैं। Answer choose करने के बाद दिया गया explanation जरूर पढ़ें।

Question 24

EN + हिं Medium
GB Which OOP concept hides unnecessary implementation details?
IN कौन सी OOP अवधारणा अनावश्यक कार्यान्वयन विवरण छिपाती है?
Polymorphism बहुरूपता
Inheritance विरासत
Abstraction मतिहीनता
Encapsulation कैप्सूलीकरण
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Abstraction hides implementation details from the user.
व्याख्या (हिन्दी) एब्स्ट्रैक्शन उपयोगकर्ता से कार्यान्वयन विवरण छुपाता है।
🎯 Exam Perspective
यह प्रश्न Data Structures and Algorithms की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है — difficulty level "Medium"। इस तरह के प्रश्न अक्सर UPSC, SSC, Banking और Police भर्ती जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें।

Question 25

EN + हिं Medium
GB Which OOP concept binds data and methods and restricts direct access?
IN कौन सी OOP अवधारणा डेटा और विधियों को जोड़ती है और सीधी पहुंच को प्रतिबंधित करती है?
Inheritance विरासत
Polymorphism बहुरूपता
Abstraction मतिहीनता
Encapsulation कैप्सूलीकरण
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Encapsulation binds data and methods, restricting direct access.
व्याख्या (हिन्दी) एनकैप्सुलेशन डेटा और विधियों को बांधता है, सीधी पहुंच को प्रतिबंधित करता है।
🎯 Exam Perspective
Data Structures and Algorithms से जुड़ा यह सवाल — difficulty level "Medium" उन students के लिए काम का है जो Railway, SSC, Banking और Defence परीक्षाओं की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो।

Question 26

EN + हिं Easy
GB Which is NOT a pillar of OOP?
IN कौन सा OOP का स्तंभ नहीं है?
Encapsulation कैप्सूलीकरण
Inheritance विरासत
Compilation संकलन
Polymorphism बहुरूपता
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) OOP pillars: Encapsulation, Inheritance, Polymorphism, Abstraction.
व्याख्या (हिन्दी) ओओपी स्तंभ: एनकैप्सुलेशन, वंशानुक्रम, बहुरूपता, अमूर्तता।
🎯 Exam Perspective
SSC, Railway, Banking और State PCS जैसी परीक्षाओं में Data Structures and Algorithms से सवाल अक्सर पूछे जाते हैं — difficulty level "Easy"। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें।

Question 27

EN + हिं Easy
GB What does __str__ method do?
IN __str__ विधि क्या करती है?
Converts string to int स्ट्रिंग को int में परिवर्तित करता है
Returns human-readable string of object वस्तु की मानव-पठनीय स्ट्रिंग लौटाता है
Deletes object ऑब्जेक्ट हटाता है
Initializes class कक्षा प्रारंभ करता है
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) __str__ returns a human-readable string representation.
व्याख्या (हिन्दी) __str__ मानव-पठनीय स्ट्रिंग प्रतिनिधित्व लौटाता है।
🎯 Exam Perspective
अगर आप SSC CGL, IBPS, RRB और State-level परीक्षाओं की तैयारी कर रहे हैं, तो Data Structures and Algorithms का यह topic आपके लिए महत्वपूर्ण है — difficulty level "Easy"। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें।

Question 28

EN + हिं Easy
GB What does __del__ method do?
IN __del__ विधि क्या करती है?
Initializes object ऑब्जेक्ट को प्रारंभ करता है
Called when object is garbage collected जब ऑब्जेक्ट कचरा एकत्र किया जाता है तो कॉल किया जाता है
Returns string स्ट्रिंग लौटाता है
Checks equality समानता की जाँच करता है
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) __del__ is the destructor, called when object is garbage collected.
व्याख्या (हिन्दी) __del__ विध्वंसक है, जिसे तब कहा जाता है जब ऑब्जेक्ट कचरा एकत्र किया जाता है।
🎯 Exam Perspective
Data Structures and Algorithms के इस प्रश्न को — difficulty level "Easy" कई प्रतियोगी परीक्षाओं जैसे UPSC, SSC, Banking और Police भर्ती में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें।

Question 29

EN + हिं Easy
GB What does super() do?
IN सुपर() क्या करता है?
Calls static method स्थैतिक विधि को कॉल करता है
Calls parent class method from child बच्चे से पैरेंट क्लास विधि को कॉल करता है
Creates new class नई कक्षा बनाता है
Deletes object ऑब्जेक्ट हटाता है
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) super() calls the parent class's method from within the child class.
व्याख्या (हिन्दी) सुपर() चाइल्ड क्लास के भीतर से पैरेंट क्लास की विधि को कॉल करता है।
🎯 Exam Perspective
यह सवाल Data Structures and Algorithms category का है — difficulty level "Easy", और Railway, SSC, Banking और Defence परीक्षाओं के exam pattern में इस तरह के questions common हैं। Answer choose करने के बाद दिया गया explanation जरूर पढ़ें।

Question 30

EN + हिं Medium
GB Which relationship is represented by 'Dog IS-A Animal'?
IN 'कुत्ता एक जानवर है' किस रिश्ते को दर्शाता है?
Composition संघटन
Aggregation एकत्रीकरण
Inheritance विरासत
Polymorphism बहुरूपता
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) IS-A relationship = inheritance. Dog inherits from Animal.
व्याख्या (हिन्दी) आईएस-ए रिश्ता = विरासत. कुत्ते को जानवर से विरासत मिलती है।
🎯 Exam Perspective
यह प्रश्न Data Structures and Algorithms की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है — difficulty level "Medium"। इस तरह के प्रश्न अक्सर SSC, Railway, Banking और State PCS जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें।