Data Structures and Algorithms — MCQ Practice

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

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

Question 1

EN + हिं
GB Which keyword defines a class in Python?
IN कौन सा कीवर्ड पायथन में एक क्लास को परिभाषित करता है?
define परिभाषित करना
class कक्षा
struct struct
object वस्तु
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) The 'class' keyword is used to define a class in Python.
व्याख्या (हिन्दी) पायथन में क्लास को परिभाषित करने के लिए 'क्लास' कीवर्ड का उपयोग किया जाता है।
🎯 Exam Perspective
Data Structures and Algorithms ("Introduction to DSA" sub-topic) से जुड़ा यह सवाल उन students के लिए काम का है जो Railway, SSC, Banking और Defence परीक्षाओं की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो।

Question 2

EN + हिं Easy
GB What is an object in Python OOP?
IN पायथन OOP में एक ऑब्जेक्ट क्या है?
A blueprint of a class एक कक्षा का खाका
A function inside a module एक मॉड्यूल के अंदर एक फ़ंक्शन
An instantiation of a class एक वर्ग की एक तात्कालिकता
A global variable एक वैश्विक चर
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) An object is an instantiation of a class — created when class() is called.
व्याख्या (हिन्दी) एक ऑब्जेक्ट एक क्लास का इन्स्टेन्शियेशन है - जब क्लास() कहा जाता है तब बनाया जाता है।
🎯 Exam Perspective
SSC, Railway, Banking और State PCS जैसी परीक्षाओं में Data Structures and Algorithms ("Introduction to DSA" sub-topic) से सवाल अक्सर पूछे जाते हैं — difficulty level "Easy"। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें।

Question 3

EN + हिं Medium
GB Which method is called automatically when an object is created?
IN जब कोई ऑब्जेक्ट बनाया जाता है तो कौन सी विधि स्वचालित रूप से कॉल की जाती है?
__create__() __बनाएं__()
__start__() __शुरू करना__()
__init__() __इस में__()
__new__() __नया__()
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) __init__() is the constructor, called automatically on object creation.
व्याख्या (हिन्दी) __init__() कंस्ट्रक्टर है, जिसे ऑब्जेक्ट निर्माण पर स्वचालित रूप से कॉल किया जाता है।
🎯 Exam Perspective
अगर आप SSC CGL, IBPS, RRB और State-level परीक्षाओं की तैयारी कर रहे हैं, तो Data Structures and Algorithms ("Introduction to DSA" sub-topic) का यह topic आपके लिए महत्वपूर्ण है — difficulty level "Medium"। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें।

Question 4

EN + हिं
GB What does 'self' represent in a Python class method?
IN पायथन क्लास विधि में 'स्वयं' क्या दर्शाता है?
Static reference to class कक्षा का स्थैतिक संदर्भ
Current instance of the class कक्षा का वर्तमान उदाहरण
A global variable एक वैश्विक चर
A built-in keyword एक अंतर्निहित कीवर्ड
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) 'self' refers to the current instance of the class.
व्याख्या (हिन्दी) 'स्वयं' वर्ग के वर्तमान उदाहरण को संदर्भित करता है।
🎯 Exam Perspective
Data Structures and Algorithms ("Introduction to DSA" sub-topic) के इस प्रश्न को कई प्रतियोगी परीक्षाओं जैसे UPSC, SSC, Banking और Police भर्ती में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें।

Question 5

EN + हिं
GB What is a class variable in Python?
IN पायथन में क्लास वेरिएबल क्या है?
Defined inside __init__ with self स्वयं के साथ __init__ के अंदर परिभाषित
Shared by all instances, defined outside constructor सभी उदाहरणों द्वारा साझा किया गया, बाहरी कंस्ट्रक्टर द्वारा परिभाषित
A local variable in a method एक विधि में एक स्थानीय चर
An imported variable एक आयातित चर
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Class variables are shared among all instances; defined outside any method.
व्याख्या (हिन्दी) वर्ग चर सभी उदाहरणों के बीच साझा किए जाते हैं; किसी भी विधि के बाहर परिभाषित।
🎯 Exam Perspective
यह सवाल Data Structures and Algorithms ("Introduction to DSA" sub-topic) category का है, और Railway, SSC, Banking और Defence परीक्षाओं के exam pattern में इस तरह के questions common हैं। Answer choose करने के बाद दिया गया explanation जरूर पढ़ें।

Question 6

EN + हिं Medium
GB Which keyword makes a local variable refer to the global variable?
IN कौन सा कीवर्ड स्थानीय वैरिएबल को वैश्विक वैरिएबल का संदर्भ देता है?
extern बाहरी
static स्थिर
global वैश्विक
nonlocal गैर स्थानीय
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) The 'global' keyword inside a function refers to the global variable.
व्याख्या (हिन्दी) किसी फ़ंक्शन के अंदर 'वैश्विक' कीवर्ड वैश्विक चर को संदर्भित करता है।
🎯 Exam Perspective
यह प्रश्न Data Structures and Algorithms ("Introduction to DSA" sub-topic) की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है — difficulty level "Medium"। इस तरह के प्रश्न अक्सर SSC, Railway, Banking और State PCS जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें।

Question 7

EN + हिं Medium
GB Which type of method requires an object to be called?
IN किस प्रकार की विधि के लिए किसी ऑब्जेक्ट को कॉल करने की आवश्यकता होती है?
Static method स्थैतिक विधि
Class method वर्ग विधि
Instance method उदाहरण विधि
Abstract method सार विधि
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Instance methods use 'self' and require an object.
व्याख्या (हिन्दी) इंस्टेंस विधियाँ 'स्वयं' का उपयोग करती हैं और एक वस्तु की आवश्यकता होती है।
🎯 Exam Perspective
Data Structures and Algorithms ("Introduction to DSA" sub-topic) से जुड़ा यह सवाल — difficulty level "Medium" उन students के लिए काम का है जो SSC CGL, IBPS, RRB और State-level परीक्षाओं की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो।

Question 8

EN + हिं
GB Which decorator defines a class method?
IN कौन सा डेकोरेटर क्लास पद्धति को परिभाषित करता है?
@staticmethod @staticmethod
@instancemethod @instancemethod
@classmethod @classmethod
@abstractmethod @abstractmethod
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) @classmethod with 'cls' as first parameter defines a class method.
व्याख्या (हिन्दी) पहले पैरामीटर के रूप में 'cls' के साथ @classmethod एक क्लास विधि को परिभाषित करता है।
🎯 Exam Perspective
UPSC, SSC, Banking और Police भर्ती जैसी परीक्षाओं में Data Structures and Algorithms ("Introduction to DSA" sub-topic) से सवाल अक्सर पूछे जाते हैं। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें।

Question 9

EN + हिं Medium
GB Which decorator defines a static method?
IN कौन सा डेकोरेटर स्थैतिक विधि को परिभाषित करता है?
@classmethod @classmethod
@staticmethod @staticmethod
@property @संपत्ति
@abstract @अमूर्त
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) @staticmethod defines methods that need no self or cls.
व्याख्या (हिन्दी) @staticmethod उन तरीकों को परिभाषित करता है जिनके लिए self या cls की आवश्यकता नहीं होती है।
🎯 Exam Perspective
अगर आप Railway, SSC, Banking और Defence परीक्षाओं की तैयारी कर रहे हैं, तो Data Structures and Algorithms ("Introduction to DSA" sub-topic) का यह topic आपके लिए महत्वपूर्ण है — difficulty level "Medium"। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें।

Question 10

EN + हिं
GB What parameter is the first argument in a class method?
IN क्लास विधि में पहला तर्क कौन सा पैरामीटर है?
self खुद
this यह
cls सीएलएस
class कक्षा
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) 'cls' refers to the class itself in class methods.
व्याख्या (हिन्दी) 'सीएलएस' क्लास विधियों में क्लास को ही संदर्भित करता है।
🎯 Exam Perspective
Data Structures and Algorithms ("Introduction to DSA" sub-topic) के इस प्रश्न को कई प्रतियोगी परीक्षाओं जैसे SSC, Railway, Banking और State PCS में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें।

Question 11

EN + हिं Easy
GB What is a mutator (setter)?
IN म्यूटेटर (सेटर) क्या है?
Fetches value of instance variable इंस्टेंस वेरिएबल का मान प्राप्त करता है
Modifies value of instance variable इंस्टेंस वेरिएबल का मान संशोधित करता है
Creates objects वस्तुएं बनाता है
Decorates class methods वर्ग विधियों को सजाता है
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) A setter/mutator modifies the value of an instance variable.
व्याख्या (हिन्दी) एक सेटर/म्यूटेटर एक इंस्टेंस वेरिएबल के मान को संशोधित करता है।
🎯 Exam Perspective
यह सवाल Data Structures and Algorithms ("Introduction to DSA" sub-topic) category का है — difficulty level "Easy", और SSC CGL, IBPS, RRB और State-level परीक्षाओं के exam pattern में इस तरह के questions common हैं। Answer choose करने के बाद दिया गया explanation जरूर पढ़ें।

Question 12

EN + हिं Medium
GB How many types of inheritance are there in Python?
IN पाइथॉन में इनहेरिटेंस कितने प्रकार के होते हैं?
3 3
4 4
5 5
6 6
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Five: Single, Multiple, Multi-Level, Hierarchical, Hybrid.
व्याख्या (हिन्दी) पाँच: एकल, एकाधिक, बहु-स्तरीय, श्रेणीबद्ध, संकर।
🎯 Exam Perspective
यह प्रश्न Data Structures and Algorithms ("Introduction to DSA" sub-topic) की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है — difficulty level "Medium"। इस तरह के प्रश्न अक्सर UPSC, SSC, Banking और Police भर्ती जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें।

Question 13

EN + हिं Medium
GB In single inheritance, how many parent classes does a child have?
IN एकल वंशानुक्रम में, एक बच्चे के पास कितने मूल वर्ग होते हैं?
Two दो
Three तीन
One एक
Zero शून्य
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Single inheritance: one child class from exactly one parent class.
व्याख्या (हिन्दी) एकल वंशानुक्रम: बिल्कुल एक मूल वर्ग से एक बच्चा वर्ग।
🎯 Exam Perspective
Data Structures and Algorithms ("Introduction to DSA" sub-topic) से जुड़ा यह सवाल — difficulty level "Medium" उन students के लिए काम का है जो Railway, SSC, Banking और Defence परीक्षाओं की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो।

Question 14

EN + हिं Medium
GB Which inheritance has one child from two or more parents?
IN दो या दो से अधिक माता-पिता से एक बच्चे को कौन सी विरासत प्राप्त होती है?
Single अकेला
Multi-Level मल्टी लेवल
Multiple विभिन्न
Hierarchical श्रेणीबद्ध
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Multiple Inheritance: class Child(Parent1, Parent2).
व्याख्या (हिन्दी) एकाधिक वंशानुक्रम: वर्ग बाल (अभिभावक1, अभिभावक2)।
🎯 Exam Perspective
SSC, Railway, Banking और State PCS जैसी परीक्षाओं में Data Structures and Algorithms ("Introduction to DSA" sub-topic) से सवाल अक्सर पूछे जाते हैं — difficulty level "Medium"। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें।

Question 15

EN + हिं Medium
GB In multi-level inheritance, the structure is:
IN बहु-स्तरीय विरासत में, संरचना है:
One parent two children एक माता-पिता दो बच्चे
A child derived from another child class एक बच्चा दूसरे बच्चे वर्ग से प्राप्त हुआ
Two parents one child दो माता-पिता एक बच्चा
All from single root सभी एक ही जड़ से
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Multi-level: chain A→B→C where each derives from previous.
व्याख्या (हिन्दी) बहु-स्तरीय: श्रृंखला A→B→C जहां प्रत्येक पिछले से प्राप्त होता है।
🎯 Exam Perspective
अगर आप SSC CGL, IBPS, RRB और State-level परीक्षाओं की तैयारी कर रहे हैं, तो Data Structures and Algorithms ("Introduction to DSA" sub-topic) का यह topic आपके लिए महत्वपूर्ण है — difficulty level "Medium"। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें।