541 Question 541 EN + हिं Easy GB What is cohesion in software design? IN सॉफ़्टवेयर डिज़ाइन में सामंजस्य क्या है? A How modules are related मॉड्यूल कैसे संबंधित हैं B Degree to which a class/module has a single, focused purpose वह डिग्री जिस तक कक्षा/मॉड्यूल का एक ही, केंद्रित उद्देश्य होता है C Coupling between modules मॉड्यूल के बीच युग्मन D Number of methods विधियों की संख्या ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) High cohesion: class does one thing well. व्याख्या (हिन्दी) उच्च सामंजस्य: वर्ग एक काम अच्छी तरह से करता है। 🎯 Exam Perspective Data Structures and Algorithms ("Introduction to DSA" sub-topic) से जुड़ा यह सवाल — difficulty level "Easy" उन students के लिए काम का है जो UPSC, SSC, Banking और Police भर्ती की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो। 🔗 Related Questions The output of: int gcd(int a,int b){return b==0?a:gcd(b... What is composition over inheritance principle? Which is an anti-pattern? 📚 Related Topic Arrays (16) Linked List (25) Stack (14)
542 Question 542 EN + हिं Easy GB What is coupling in software design? IN सॉफ़्टवेयर डिज़ाइन में कपलिंग क्या है? A Internal module focus आंतरिक मॉड्यूल फोकस B Degree of interdependence between modules (lower is better) मॉड्यूल के बीच परस्पर निर्भरता की डिग्री (कम बेहतर है) C Number of classes कक्षाओं की संख्या D Code complexity कोड जटिलता ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) Low coupling: modules independent, easier to change. व्याख्या (हिन्दी) कम युग्मन: मॉड्यूल स्वतंत्र, बदलने में आसान। 🎯 Exam Perspective Railway, SSC, Banking और Defence परीक्षाओं जैसी परीक्षाओं में Data Structures and Algorithms ("Introduction to DSA" sub-topic) से सवाल अक्सर पूछे जाते हैं — difficulty level "Easy"। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें। 🔗 Related Questions The output of: class A{public:int x; A(int x):x(x){}};... The output of: int f(int n){return n The output of: int arr[]={5,3,8,1,9,2}; sort(arr,arr+6)... 📚 Related Topic Arrays (16) Linked List (25) Stack (14)
543 Question 543 EN + हिं Medium GB High cohesion and low coupling is: IN उच्च सामंजस्य और निम्न युग्मन है: A Bad design ख़राब डिज़ाइन B Good design (focused modules, minimal interdependence) अच्छा डिज़ाइन (केंद्रित मॉड्यूल, न्यूनतम परस्पर निर्भरता) C Only for OOP केवल OOP के लिए D Only for large systems केवल बड़े सिस्टम के लिए ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) High cohesion + low coupling = maintainable, modular design. व्याख्या (हिन्दी) उच्च सामंजस्य + कम युग्मन = रखरखाव योग्य, मॉड्यूलर डिज़ाइन। 🎯 Exam Perspective अगर आप SSC, Railway, Banking और State PCS की तैयारी कर रहे हैं, तो Data Structures and Algorithms ("Introduction to DSA" sub-topic) का यह topic आपके लिए महत्वपूर्ण है — difficulty level "Medium"। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें। 🔗 Related Questions What is composition over inheritance principle? What is cohesion in software design? The output of: int power(int b,int e){return e==0?1:b*p... 📚 Related Topic Arrays (16) Linked List (25) Stack (14)
544 Question 544 EN + हिं GB A God class (class that does everything) violates: IN एक ईश्वर वर्ग (वह वर्ग जो सब कुछ करता है) उल्लंघन करता है: A Open/Closed Principle खुला/बंद सिद्धांत B Single Responsibility Principle एकल उत्तरदायित्व सिद्धांत C Liskov Substitution लिस्कोव प्रतिस्थापन D Interface Segregation इंटरफ़ेस पृथक्करण ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) God class has too many responsibilities - SRP violation. व्याख्या (हिन्दी) ईश्वर वर्ग की बहुत अधिक जिम्मेदारियाँ हैं - एसआरपी उल्लंघन। 🎯 Exam Perspective Data Structures and Algorithms ("Introduction to DSA" sub-topic) के इस प्रश्न को कई प्रतियोगी परीक्षाओं जैसे SSC CGL, IBPS, RRB और State-level परीक्षाओं में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें। 🔗 Related Questions Which is an anti-pattern? What is composition over inheritance principle? The output of: int f(int n){return n 📚 Related Topic Arrays (16) Linked List (25) Stack (14)
545 Question 545 EN + हिं Easy GB What is composition over inheritance principle? IN वंशानुक्रम सिद्धांत पर संरचना क्या है? A Always use inheritance हमेशा इनहेरिटेंस का उपयोग करें B Prefer building objects from components rather than inheriting विरासत में मिलने के बजाय घटकों से वस्तुओं का निर्माण करना पसंद करें C Never use inheritance विरासत का उपयोग कभी न करें D Only use templates केवल टेम्प्लेट का उपयोग करें ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) Composition is more flexible and avoids inheritance coupling. व्याख्या (हिन्दी) संरचना अधिक लचीली है और वंशानुक्रम युग्मन से बचती है। 🎯 Exam Perspective यह सवाल Data Structures and Algorithms ("Introduction to DSA" sub-topic) category का है — difficulty level "Easy", और UPSC, SSC, Banking और Police भर्ती के exam pattern में इस तरह के questions common हैं। Answer choose करने के बाद दिया गया explanation जरूर पढ़ें। 🔗 Related Questions What is cohesion in software design? A God class (class that does everything) violates: Which is an anti-pattern? 📚 Related Topic Arrays (16) Linked List (25) Stack (14)
546 Question 546 EN + हिं Medium GB Law of Demeter (Principle of Least Knowledge) says: IN डेमेटर का नियम (न्यूनतम ज्ञान का सिद्धांत) कहता है: A Talk to everyone सबसे बात करो B Object should only talk to immediate friends (not friends of friends) वस्तु को केवल निकटतम मित्रों से बात करनी चाहिए (दोस्तों के मित्रों से नहीं) C Share all data सभी डेटा साझा करें D Use global variables वैश्विक चर का प्रयोग करें ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) obj.getA().getB().doC() violates LoD. व्याख्या (हिन्दी) obj.getA().getB().doC() LoD का उल्लंघन करता है। 🎯 Exam Perspective यह प्रश्न Data Structures and Algorithms ("Introduction to DSA" sub-topic) की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है — difficulty level "Medium"। इस तरह के प्रश्न अक्सर Railway, SSC, Banking और Defence परीक्षाओं जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें। 🔗 Related Questions The output of: int arr[]={5,3,8,1,9,2}; sort(arr,arr+6)... A God class (class that does everything) violates: High cohesion and low coupling is: 📚 Related Topic Arrays (16) Linked List (25) Stack (14)
547 Question 547 EN + हिं Medium GB Which is an anti-pattern? IN कौन सा एक विरोधी पैटर्न है? A Design pattern डिज़ाइन पैटर्न B Singleton overuse, God class, Copy-paste programming सिंगलटन अति प्रयोग, गॉड क्लास, कॉपी-पेस्ट प्रोग्रामिंग C Inheritance विरासत D Encapsulation कैप्सूलीकरण ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) Anti-patterns are commonly used but counterproductive solutions. व्याख्या (हिन्दी) आमतौर पर विरोधी पैटर्न का उपयोग किया जाता है लेकिन प्रतिउत्पादक समाधान। 🎯 Exam Perspective Data Structures and Algorithms ("Introduction to DSA" sub-topic) से जुड़ा यह सवाल — difficulty level "Medium" उन students के लिए काम का है जो SSC, Railway, Banking और State PCS की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो। 🔗 Related Questions What is cohesion in software design? High cohesion and low coupling is: The output of: int gcd(int a,int b){return b==0?a:gcd(b... 📚 Related Topic Arrays (16) Linked List (25) Stack (14)
548 Question 548 EN + हिं GB The output of: class C{int x; public: C():x(0){} C(int x):x(x){} void print(){cout< IN का आउटपुट: वर्ग C{int x; सार्वजनिक: C():x(0){} C(int x):x(x){} void print(){cout A 05 05 B 50 50 C 00 00 D 55 55 ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) c1 uses default ctor (x=0); c2 uses parameterized (x=5). व्याख्या (हिन्दी) c1 डिफ़ॉल्ट ctor (x=0) का उपयोग करता है; c2 पैरामीटरयुक्त (x=5) का उपयोग करता है। 🎯 Exam Perspective SSC CGL, IBPS, RRB और State-level परीक्षाओं जैसी परीक्षाओं में Data Structures and Algorithms ("Introduction to DSA" sub-topic) से सवाल अक्सर पूछे जाते हैं। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें। 🔗 Related Questions The output of: class A{public:int x; A(int x):x(x){}};... What is coupling in software design? The output of: int power(int b,int e){return e==0?1:b*p... 📚 Related Topic Arrays (16) Linked List (25) Stack (14)
549 Question 549 EN + हिं GB The output of: class A{public:int x; A(int x):x(x){}}; A a(5); cout< IN का आउटपुट: क्लास ए {सार्वजनिक: int x; A(int x):x(x){}}; ए ए(5); अदालत A Error गलती B 5 5 D Undefined अपरिभाषित ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) x is public; direct access gives x=5. व्याख्या (हिन्दी) x सार्वजनिक है; सीधी पहुंच x=5 देती है। 🎯 Exam Perspective अगर आप UPSC, SSC, Banking और Police भर्ती की तैयारी कर रहे हैं, तो Data Structures and Algorithms ("Introduction to DSA" sub-topic) का यह topic आपके लिए महत्वपूर्ण है। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें। 🔗 Related Questions What is cohesion in software design? High cohesion and low coupling is: A God class (class that does everything) violates: 📚 Related Topic Arrays (16) Linked List (25) Stack (14)
550 Question 550 EN + हिं GB The output of: int f(int n){return n<=1 ? 1 : n*f(n-1);} cout< IN इसका आउटपुट: int f(int n){return n A 120 120 B 24 24 C 5 5 D Error गलती ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) 5! = 5*4*3*2*1 = 120. व्याख्या (हिन्दी) 5! = 5*4*3*2*1 = 120. 🎯 Exam Perspective Data Structures and Algorithms ("Introduction to DSA" sub-topic) के इस प्रश्न को कई प्रतियोगी परीक्षाओं जैसे Railway, SSC, Banking और Defence परीक्षाओं में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें। 🔗 Related Questions The output of: class C{int x; public: C():x(0){} C(int... The output of: int gcd(int a,int b){return b==0?a:gcd(b... What is composition over inheritance principle? 📚 Related Topic Arrays (16) Linked List (25) Stack (14)
551 Question 551 EN + हिं GB The output of: int f(int n){return n<=1 ? n : f(n-1)+f(n-2);} cout< IN इसका आउटपुट: int f(int n){return n A 13 13 B 21 21 C 8 8 D 34 34 ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) Fibonacci: F(7)=13. व्याख्या (हिन्दी) फाइबोनैचि: एफ(7)=13. 🎯 Exam Perspective यह सवाल Data Structures and Algorithms ("Introduction to DSA" sub-topic) category का है, और SSC, Railway, Banking और State PCS के exam pattern में इस तरह के questions common हैं। Answer choose करने के बाद दिया गया explanation जरूर पढ़ें। 🔗 Related Questions The output of: class A{public:int x; A(int x):x(x){}};... Fast power (exponentiation by squaring) computes a^n in... What is composition over inheritance principle? 📚 Related Topic Arrays (16) Linked List (25) Stack (14)
552 Question 552 EN + हिं GB The output of: int gcd(int a,int b){return b==0?a:gcd(b,a%b);} cout< IN इसका आउटपुट: int gcd(int a,int b){return b==0?a:gcd(b,a%b);} cout A 6 6 B 3 3 C 9 9 D 18 18 ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) GCD(48,18)=GCD(18,12)=GCD(12,6)=GCD(6,0)=6. व्याख्या (हिन्दी) जीसीडी(48,18)=जीसीडी(18,12)=जीसीडी(12,6)=जीसीडी(6,0)=6। 🎯 Exam Perspective यह प्रश्न Data Structures and Algorithms ("Introduction to DSA" sub-topic) की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है। इस तरह के प्रश्न अक्सर SSC CGL, IBPS, RRB और State-level परीक्षाओं जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें। 🔗 Related Questions The output of: int f(int n){return n What is coupling in software design? The output of: class C{int x; public: C():x(0){} C(int... 📚 Related Topic Arrays (16) Linked List (25) Stack (14)
553 Question 553 EN + हिं GB The output of: int power(int b,int e){return e==0?1:b*power(b,e-1);} cout< IN इसका आउटपुट: int power(int b,int e){return e==0?1:b*power(b,e-1);} cout A 128 128 B 256 256 C 64 64 D 512 512 ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) 2^8=256. व्याख्या (हिन्दी) 2^8=256. 🎯 Exam Perspective Data Structures and Algorithms ("Introduction to DSA" sub-topic) से जुड़ा यह सवाल उन students के लिए काम का है जो UPSC, SSC, Banking और Police भर्ती की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो। 🔗 Related Questions Which is an anti-pattern? The output of: class C{int x; public: C():x(0){} C(int... The output of: int gcd(int a,int b){return b==0?a:gcd(b... 📚 Related Topic Arrays (16) Linked List (25) Stack (14)
554 Question 554 EN + हिं Medium GB Fast power (exponentiation by squaring) computes a^n in: IN तीव्र शक्ति (वर्गीकरण द्वारा घातांक) a^n की गणना करता है: A O(n) पर) B O(log n) ओ(लॉग एन) C O(n^2) ओ(एन^2) D O(1) हे(1) ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) Square the base for even exponents: O(log n). व्याख्या (हिन्दी) सम घातांक के लिए आधार का वर्ग करें: O(लॉग एन)। 🎯 Exam Perspective Railway, SSC, Banking और Defence परीक्षाओं जैसी परीक्षाओं में Data Structures and Algorithms ("Introduction to DSA" sub-topic) से सवाल अक्सर पूछे जाते हैं — difficulty level "Medium"। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें। 🔗 Related Questions High cohesion and low coupling is: Which is an anti-pattern? The output of: int power(int b,int e){return e==0?1:b*p... 📚 Related Topic Arrays (16) Linked List (25) Stack (14)
555 Question 555 EN + हिं GB The output of: int arr[]={5,3,8,1,9,2}; sort(arr,arr+6); cout< IN इसका आउटपुट: int arr[]={5,3,8,1,9,2}; क्रमबद्ध करें (arr,arr+6); अदालत A 1 9 1 9 B 5 2 5 2 C 9 1 9 1 D 3 8 3 8 ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) Sorted ascending: arr[0]=1, arr[5]=9. व्याख्या (हिन्दी) आरोही क्रम में क्रमबद्ध: arr[0]=1, arr[5]=9। 🎯 Exam Perspective अगर आप SSC, Railway, Banking और State PCS की तैयारी कर रहे हैं, तो Data Structures and Algorithms ("Introduction to DSA" sub-topic) का यह topic आपके लिए महत्वपूर्ण है। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें। 🔗 Related Questions Which is an anti-pattern? The output of: class A{public:int x; A(int x):x(x){}};... High cohesion and low coupling is: 📚 Related Topic Arrays (16) Linked List (25) Stack (14)