OOP Using C++ — MCQ Practice

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

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

Question 31

EN + हिं
GB What is the output: int x=5; if(x) { int x=10; cout<
IN आउटपुट क्या है: int x=5; यदि(x) { int x=10; अदालत
105 105
1010 1010
55 55
Compile error संकलन त्रुटि
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Inner block has its own x=10 (shadows outer). Prints 10 inside block, then outer x=5. Output: 105.
व्याख्या (हिन्दी) आंतरिक ब्लॉक का अपना x=10 (बाहरी छाया) होता है। ब्लॉक के अंदर 10 प्रिंट करता है, फिर बाहरी x=5 प्रिंट करता है। आउटपुट: 105.
🎯 Exam Perspective
OOP Using C++ ("Control Statements" sub-topic) से जुड़ा यह सवाल उन students के लिए काम का है जो SSC, Railway, Banking और State PCS की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो।

Question 32

EN + हिं
GB What is the output: int x=5; (x>3)?cout<<'Y':cout<<'N';
IN आउटपुट क्या है: int x=5; (x>3)?काउट
Y वाई
N एन
Compile error संकलन त्रुटि
Undefined अपरिभाषित
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) x>3=true; cout<<'Y'. Output: Y.
व्याख्या (हिन्दी) x>3=सत्य; अदालत
🎯 Exam Perspective
SSC, Railway, Banking और State PCS जैसी परीक्षाओं में OOP Using C++ ("Control Statements" sub-topic) से सवाल अक्सर पूछे जाते हैं। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें।

Question 33

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

Question 34

EN + हिं
GB What is the output: int x=5; switch(x){case 5: cout<
IN आउटपुट क्या है: int x=5; स्विच(x){केस 5: कॉउट
56 56
55 55
Compile error संकलन त्रुटि
Undefined अपरिभाषित
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) case 5: x++=5(x=6), fallthrough to case 6: x=6. Output: 56.
व्याख्या (हिन्दी) केस 5: x++=5(x=6), केस 6: x=6 तक। आउटपुट: 56.
🎯 Exam Perspective
OOP Using C++ ("Control Statements" sub-topic) के इस प्रश्न को कई प्रतियोगी परीक्षाओं जैसे UPSC, SSC, Banking और Police भर्ती में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें।

Question 35

EN + हिं
GB 'What is the output: int i=5; do{cout<
IN 'आउटपुट क्या है: int i=5; करो {मुफ़्त करो
6 6
2 2
6. 6>=5: stop. Output: 6.', 0, '2026-05-25', '2026-05-25'), (1, 6, 74, 4, 4, 'What is the output: for(int i=0;i<5;i++) if(i%3==0) cout<<i;', 'Print multiples of 3 in 0-4?', '03', '03', '0', '0', '3', '3', 'Compile error', 'Compile error', NULL, 'option_a', 'i=0: 0%3=0 print; i=3: 3%3=0 print. Output: 03.', 0, '2026-05-25', '2026-05-25'), (1, 6, 74, 4, 4, 'What is the output: int x=10; for(;x>0;x/=2) cout<<x%2;', 'Binary of 10 via loop?', '0101', '0101', '1010', '1010', 'Compile error', 'Compile error', 'Undefined', 'Undefined', NULL, 'option_a', '10%2=0 6. 6>=5: रुकें. आउटपुट: 6.', 0, '2026-05-25', '2026-05-25'), (1, 6, 74, 4, 4, 'आउटपुट क्या है: for(int i=0;i
2%2=0 2%2=0
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) 27
व्याख्या (हिन्दी) 27
🎯 Exam Perspective
यह सवाल OOP Using C++ ("Control Statements" sub-topic) category का है, और Railway, SSC, Banking और Defence परीक्षाओं के exam pattern में इस तरह के questions common हैं। Answer choose करने के बाद दिया गया explanation जरूर पढ़ें।

Question 36

EN + हिं
GB What is the output: for(int i=0;i<10;i+=3) cout<
IN आउटपुट क्या है: for(int i=0;i
0369 0369
036 036
Compile error संकलन त्रुटि
Undefined अपरिभाषित
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) 0,3,6,9. Output: 0369.
व्याख्या (हिन्दी) 0,3,6,9. आउटपुट: 0369.
🎯 Exam Perspective
यह प्रश्न OOP Using C++ ("Control Statements" sub-topic) की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है। इस तरह के प्रश्न अक्सर SSC, Railway, Banking और State PCS जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें।

Question 37

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

Question 38

EN + हिं
GB What is the output: for(int i=0;i<5;i++) if(i%3==0) cout<
IN आउटपुट क्या है: for(int i=0;i
03 03
3 3
Compile error संकलन त्रुटि
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) i=0: 0%3=0 print; i=3: 3%3=0 print. Output: 03.
व्याख्या (हिन्दी) i=0: 0%3=0 प्रिंट; i=3: 3%3=0 प्रिंट। आउटपुट: 03.
🎯 Exam Perspective
UPSC, SSC, Banking और Police भर्ती जैसी परीक्षाओं में OOP Using C++ ("Control Statements" sub-topic) से सवाल अक्सर पूछे जाते हैं। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें।

Question 39

EN + हिं
GB What is the output: int x=10; for(;x>0;x/=2) cout<
IN आउटपुट क्या है: int x=10; for(;x>0;x/=2) cout
0101 0101
1010 1010
Compile error संकलन त्रुटि
Undefined अपरिभाषित
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) 10%2=0,5%2=1,2%2=0,1%2=1. Output: 0101.
व्याख्या (हिन्दी) 10%2=0,5%2=1,2%2=0,1%2=1. आउटपुट: 0101.
🎯 Exam Perspective
अगर आप Railway, SSC, Banking और Defence परीक्षाओं की तैयारी कर रहे हैं, तो OOP Using C++ ("Control Statements" sub-topic) का यह topic आपके लिए महत्वपूर्ण है। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें।

Question 40

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

Question 41

EN + हिं
GB What is the output: for(int i=0;i<3;i++) for(int j=0;j<3;j++) if(i==j) cout<
IN आउटपुट क्या है: for(int i=0;i
024 024
012 012
Compile error संकलन त्रुटि
Undefined अपरिभाषित
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) i=j=0:0+0=0; i=j=1:2; i=j=2:4. Output: 024.
व्याख्या (हिन्दी) i=j=0:0+0=0; मैं=जे=1:2; मैं=जे=2:4. आउटपुट: 024.
🎯 Exam Perspective
यह सवाल OOP Using C++ ("Control Statements" 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 x=1; while(x<1000) x*=3; cout<
IN आउटपुट क्या है: int x=1; जबकि(x
2187 2187
729 729
Compile error संकलन त्रुटि
Undefined अपरिभाषित
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) 1,3,9,27,81,243,729,2187. Output: 2187.
व्याख्या (हिन्दी) 1,3,9,27,81,243,729,2187। आउटपुट: 2187.
🎯 Exam Perspective
यह प्रश्न OOP Using C++ ("Control Statements" sub-topic) की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है। इस तरह के प्रश्न अक्सर UPSC, SSC, Banking और Police भर्ती जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें।

Question 43

EN + हिं
GB What is 'switch expression' in C++23?
IN C++23 में 'स्विच एक्सप्रेशन' क्या है?
Not yet in C++23; only statement form exists अभी तक C++23 में नहीं; केवल कथन प्रपत्र मौजूद है
A new C++23 feature एक नई C++23 सुविधा
Same as pattern matching पैटर्न मिलान के समान
Compile error संकलन त्रुटि
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) C++ has switch statements; switch expressions (like Java) are not in any C++ standard yet.
व्याख्या (हिन्दी) C++ में स्विच स्टेटमेंट हैं; स्विच एक्सप्रेशन (जावा की तरह) अभी तक किसी भी C++ मानक में नहीं हैं।
🎯 Exam Perspective
OOP Using C++ ("Control Statements" sub-topic) से जुड़ा यह सवाल उन students के लिए काम का है जो Railway, SSC, Banking और Defence परीक्षाओं की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो।

Question 44

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

Question 45

EN + हिं
GB What is the output: int x=8; while(x>0){if(x%3==0){cout<
IN आउटपुट क्या है: int x=8; जबकि(x>0){if(x%3==0){cout
A
AAAAA एएएएए
Compile error संकलन त्रुटि
Undefined अपरिभाषित
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Matches case 5 (via fallthrough from 1-4 which have no body). Prints A. Output: A.
व्याख्या (हिन्दी) केस 5 से मेल खाता है (1-4 से फॉलथ्रू के माध्यम से जिसमें कोई बॉडी नहीं है)। प्रिंट ए. आउटपुट: ए.
🎯 Exam Perspective
अगर आप SSC CGL, IBPS, RRB और State-level परीक्षाओं की तैयारी कर रहे हैं, तो OOP Using C++ ("Control Statements" sub-topic) का यह topic आपके लिए महत्वपूर्ण है। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें।