OOP Using C++ — MCQ Practice

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

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

Question 31

EN + हिं
GB What is the output: int a[]={1,2,3,4,5}; cout<
IN आउटपुट क्या है: int a[]={1,2,3,4,5}; अदालत
6 6
5 5
Compile error संकलन त्रुटि
Undefined अपरिभाषित
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) 1+5=6. Output: 6.
व्याख्या (हिन्दी) 1+5=6. आउटपुट: 6.
🎯 Exam Perspective
OOP Using C++ ("Arrays" sub-topic) से जुड़ा यह सवाल उन students के लिए काम का है जो Railway, SSC, Banking और Defence परीक्षाओं की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो।

Question 32

EN + हिं
GB What is the output: int a[5]={1,2}; cout<
IN आउटपुट क्या है: int a[5]={1,2}; अदालत
Garbage कचरा
Undefined अपरिभाषित
Compile error संकलन त्रुटि
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Remaining elements zero-initialized. a[3]=0. Output: 0.
व्याख्या (हिन्दी) शेष तत्व शून्य-प्रारंभिक हैं। ए[3]=0. आउटपुट: 0.
🎯 Exam Perspective
SSC, Railway, Banking और State PCS जैसी परीक्षाओं में OOP Using C++ ("Arrays" sub-topic) से सवाल अक्सर पूछे जाते हैं। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें।

Question 33

EN + हिं
GB What is the output: int a[]={1,2,3}; cout<
IN आउटपुट क्या है: int a[]={1,2,3}; अदालत
12 12
3 3
8 8
Compile error संकलन त्रुटि
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) 3*4=12. Output: 12.
व्याख्या (हिन्दी) 3*4=12. आउटपुट: 12.
🎯 Exam Perspective
अगर आप SSC CGL, IBPS, RRB और State-level परीक्षाओं की तैयारी कर रहे हैं, तो OOP Using C++ ("Arrays" sub-topic) का यह topic आपके लिए महत्वपूर्ण है। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें।

Question 34

EN + हिं
GB What is the output: int a[3]; fill(begin(a),end(a),7); cout<
IN आउटपुट क्या है: int a[3]; भरें(शुरू(ए),अंत(ए),7); अदालत
7 7
Compile error संकलन त्रुटि
Undefined अपरिभाषित
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) All elements 7. a[1]=7. Output: 7.
व्याख्या (हिन्दी) सभी तत्व 7. a[1]=7. आउटपुट: 7.
🎯 Exam Perspective
OOP Using C++ ("Arrays" sub-topic) के इस प्रश्न को कई प्रतियोगी परीक्षाओं जैसे UPSC, SSC, Banking और Police भर्ती में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें।

Question 35

EN + हिं
GB What is the output: int a[]={5,4,3,2,1}; stable_sort(a,a+5); cout<
IN आउटपुट क्या है: int a[]={5,4,3,2,1}; स्थिर_सॉर्ट(ए,ए+5); अदालत
3 3
4 4
Compile error संकलन त्रुटि
Undefined अपरिभाषित
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Sorted: 1,2,3,4,5. a[2]=3. Output: 3.
व्याख्या (हिन्दी) क्रमबद्ध: 1,2,3,4,5. ए[2]=3. आउटपुट: 3.
🎯 Exam Perspective
यह सवाल OOP Using C++ ("Arrays" sub-topic) category का है, और Railway, SSC, Banking और Defence परीक्षाओं के exam pattern में इस तरह के questions common हैं। Answer choose करने के बाद दिया गया explanation जरूर पढ़ें।

Question 36

EN + हिं
GB What is the output: vector v={1,2,3}; v.push_back(4); v.insert(v.begin(),0); cout<
IN आउटपुट क्या है: वेक्टर v={1,2,3}; v.push_back(4); v.insert(v.begin(),0); अदालत
50 50
40 40
Compile error संकलन त्रुटि
Undefined अपरिभाषित
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Size=5 (0,1,2,3,4). v[0]=0. Output: 50.
व्याख्या (हिन्दी) आकार=5 (0,1,2,3,4). वी[0]=0. आउटपुट: 50.
🎯 Exam Perspective
यह प्रश्न OOP Using C++ ("Arrays" sub-topic) की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है। इस तरह के प्रश्न अक्सर SSC, Railway, Banking और State PCS जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें।

Question 37

EN + हिं
GB What is the output: int a[]={1,2,3,4,5}; cout<<*min_element(a,a+5);
IN आउटपुट क्या है: int a[]={1,2,3,4,5}; अदालत
1 1
5 5
Compile error संकलन त्रुटि
Undefined अपरिभाषित
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) min=1. Output: 1.
व्याख्या (हिन्दी) मिनट=1. आउटपुट: 1.
🎯 Exam Perspective
OOP Using C++ ("Arrays" sub-topic) से जुड़ा यह सवाल उन students के लिए काम का है जो SSC CGL, IBPS, RRB और State-level परीक्षाओं की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो।

Question 38

EN + हिं
GB What is the output: int a[4]={4,3,2,1}; sort(a,a+4); cout<
IN आउटपुट क्या है: int a[4]={4,3,2,1}; सॉर्ट करें (ए,ए+4); अदालत
14 14
41 41
Compile error संकलन त्रुटि
Undefined अपरिभाषित
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Sorted: 1,2,3,4. a[0]=1,a[3]=4. Output: 14.
व्याख्या (हिन्दी) क्रमबद्ध: 1,2,3,4. ए[0]=1,ए[3]=4. आउटपुट: 14.
🎯 Exam Perspective
UPSC, SSC, Banking और Police भर्ती जैसी परीक्षाओं में OOP Using C++ ("Arrays" sub-topic) से सवाल अक्सर पूछे जाते हैं। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें।

Question 39

EN + हिं
GB What is the output: vector v={1,2,3,4,5}; v.erase(remove_if(v.begin(),v.end(),[](int x){return x%2==0;}),v.end()); cout<
IN आउटपुट क्या है: वेक्टर v={1,2,3,4,5}; v.erase(remove_if(v.begin(),v.end(),[](int x){return x%2==0;}),v.end()); अदालत
3 3
2 2
Compile error संकलन त्रुटि
Undefined अपरिभाषित
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Removes 2,4. Remaining: 1,3,5. size=3. Output: 3.
व्याख्या (हिन्दी) 2,4 को हटाता है। शेष: 1,3,5. आकार=3. आउटपुट: 3.
🎯 Exam Perspective
अगर आप Railway, SSC, Banking और Defence परीक्षाओं की तैयारी कर रहे हैं, तो OOP Using C++ ("Arrays" sub-topic) का यह topic आपके लिए महत्वपूर्ण है। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें।

Question 40

EN + हिं
GB What is the output: int a[3][2]={{1,2},{3,4},{5,6}}; cout<
IN आउटपुट क्या है: int a[3][2]={{1,2},{3,4},{5,6}}; अदालत
7 7
6 6
Compile error संकलन त्रुटि
Undefined अपरिभाषित
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) 5+2=7. Output: 7.
व्याख्या (हिन्दी) 5+2=7. आउटपुट: 7.
🎯 Exam Perspective
OOP Using C++ ("Arrays" sub-topic) के इस प्रश्न को कई प्रतियोगी परीक्षाओं जैसे SSC, Railway, Banking और State PCS में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें।

Question 41

EN + हिं
GB What is the output: int a[]={3,1,4,1,5,9,2,6}; sort(a,a+8); cout<
IN आउटपुट क्या है: int a[]={3,1,4,1,5,9,2,6}; क्रमबद्ध करें(ए,ए+8); अदालत
4 4
5 5
3 3
Compile error संकलन त्रुटि
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Sorted: 1,1,2,3,4,5,6,9. a[4]=4. Output: 4.
व्याख्या (हिन्दी) क्रमबद्ध: 1,1,2,3,4,5,6,9। ए[4]=4. आउटपुट: 4.
🎯 Exam Perspective
यह सवाल OOP Using C++ ("Arrays" sub-topic) category का है, और SSC CGL, IBPS, RRB और State-level परीक्षाओं के exam pattern में इस तरह के questions common हैं। Answer choose करने के बाद दिया गया explanation जरूर पढ़ें।

Question 42

EN + हिं
GB What is the output: int a[]={1,2,3,4,5}; for_each(a,a+5,[](int x){cout<
IN आउटपुट क्या है: int a[]={1,2,3,4,5}; for_each(a,a+5,[](int x){cout
1 4 9 16 25 1 4 9 16 25
149 1625 149 1625
Compile error संकलन त्रुटि
Undefined अपरिभाषित
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) 1,4,9,16,25 concatenated. Output: 149 1625.
व्याख्या (हिन्दी) 1,4,9,16,25 संयोजित। आउटपुट: 149 1625.
🎯 Exam Perspective
यह प्रश्न OOP Using C++ ("Arrays" sub-topic) की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है। इस तरह के प्रश्न अक्सर UPSC, SSC, Banking और Police भर्ती जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें।

Question 43

EN + हिं
GB What is the output: int a[]={1,2,3,4,5}; cout<3;});
IN आउटपुट क्या है: int a[]={1,2,3,4,5}; अदालत
2 2
3 3
Compile error संकलन त्रुटि
Undefined अपरिभाषित
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) 4 and 5 are >3. count=2. Output: 2.
व्याख्या (हिन्दी) 4 और 5 >3 हैं। गिनती=2. आउटपुट: 2.
🎯 Exam Perspective
OOP Using C++ ("Arrays" sub-topic) से जुड़ा यह सवाल उन students के लिए काम का है जो Railway, SSC, Banking और Defence परीक्षाओं की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो।

Question 44

EN + हिं
GB What is the output: vector v={5,3,8,1,9,2}; nth_element(v.begin(),v.begin()+2,v.end()); cout<
IN आउटपुट क्या है: वेक्टर v={5,3,8,1,9,2}; nth_element(v.begin(),v.begin()+2,v.end()); अदालत
3 3
5 5
Compile error संकलन त्रुटि
Undefined अपरिभाषित
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Sorted: 1,2,3,5,8,9. 3rd(index 2)=3. Output: 3.
व्याख्या (हिन्दी) क्रमबद्ध: 1,2,3,5,8,9. तीसरा(सूचकांक 2)=3. आउटपुट: 3.
🎯 Exam Perspective
SSC, Railway, Banking और State PCS जैसी परीक्षाओं में OOP Using C++ ("Arrays" sub-topic) से सवाल अक्सर पूछे जाते हैं। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें।

Question 45

EN + हिं
GB What is the output: int a[]={1,3,5,7,9}; cout<<*lower_bound(a,a+5,6);
IN आउटपुट क्या है: int a[]={1,3,5,7,9}; अदालत
7 7
5 5
Compile error संकलन त्रुटि
Undefined अपरिभाषित
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) First element >= 6 is 7. Output: 7.
व्याख्या (हिन्दी) पहला तत्व >= 6, 7 है। आउटपुट: 7।
🎯 Exam Perspective
अगर आप SSC CGL, IBPS, RRB और State-level परीक्षाओं की तैयारी कर रहे हैं, तो OOP Using C++ ("Arrays" sub-topic) का यह topic आपके लिए महत्वपूर्ण है। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें।