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 76

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

Question 77

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

Question 78

EN + हिं
GB What is the output: int x=5,y=0; while(x>0){y=y*10+x%10;x/=10;} cout<
IN आउटपुट क्या है: int x=5,y=0; while(x>0){y=y*10+x%10;x/=10;} cout
5 5
Compile error संकलन त्रुटि
Undefined अपरिभाषित
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Single digit 5: reversed=5. Output: 5.
व्याख्या (हिन्दी) एकल अंक 5: उलटा=5. आउटपुट: 5.
🎯 Exam Perspective
यह प्रश्न OOP Using C++ ("Control Statements" sub-topic) की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है। इस तरह के प्रश्न अक्सर UPSC, SSC, Banking और Police भर्ती जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें।

Question 79

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

Question 80

EN + हिं
GB What is the output: for(int i=0;i<5;i++) {if(i%2==0)continue; if(i>3)break; cout<
IN आउटपुट क्या है: for(int i=0;i3)break; अदालत
13 13
135 135
Compile error संकलन त्रुटि
Undefined अपरिभाषित
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) i=1:print;i=3:print;i=4 even skip; i=4... wait: i=4 even,continue;i=5>5 stop. Hmm: i=0:even,skip;i=1:odd,1>3 false:print 1;i=2:even,skip;i=3:odd,3>3 false:print 3;i=4:even,skip;i=5:loop ends. Output: 13.
व्याख्या (हिन्दी) i=1:print;i=3:print;i=4 यहां तक ​​कि छोड़ें; i=4... रुकें: i=4 सम,जारी रखें;i=5>5 रुकें। हम्म: i=0:सम,छोड़ें;i=1:विषम,1>3 असत्य:प्रिंट 1;i=2:सम,छोड़ें;i=3:विषम,3>3 असत्य:प्रिंट 3;i=4:सम,छोड़ें;i=5:लूप समाप्त होता है। आउटपुट: 13.
🎯 Exam Perspective
SSC CGL, IBPS, RRB और State-level परीक्षाओं जैसी परीक्षाओं में OOP Using C++ ("Control Statements" sub-topic) से सवाल अक्सर पूछे जाते हैं। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें।

Question 81

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

Question 82

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

Question 83

EN + हिं
GB What is the output: for(int i=0;i<5;i++) cout<<(i&1?i*i:0);
IN आउटपुट क्या है: for(int i=0;i
01094 01094
0 1 0 9 0 0 1 0 9 0
Compile error संकलन त्रुटि
Undefined अपरिभाषित
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) i=0:0,i=1:1,i=2:0,i=3:9,i=4:0. Output: 01090.
व्याख्या (हिन्दी) i=0:0,i=1:1,i=2:0,i=3:9,i=4:0. आउटपुट: 01090.
🎯 Exam Perspective
यह सवाल OOP Using C++ ("Control Statements" sub-topic) category का है, और SSC, Railway, Banking और State PCS के exam pattern में इस तरह के questions common हैं। Answer choose करने के बाद दिया गया explanation जरूर पढ़ें।

Question 84

EN + हिं
GB What is the output: int a=1,b=2; if(a>0&&(b=5)>0) cout<
IN आउटपुट क्या है: int a=1,b=2; if(a>0&&(b=5)>0) cout
5 5
2 2
Compile error संकलन त्रुटि
Undefined अपरिभाषित
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) a>0=true; evaluate (b=5)>0=true; b=5. Output: 5.
व्याख्या (हिन्दी) a>0=सत्य; मूल्यांकन करें (b=5)>0=सत्य; बी=5. आउटपुट: 5.
🎯 Exam Perspective
यह प्रश्न OOP Using C++ ("Control Statements" sub-topic) की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है। इस तरह के प्रश्न अक्सर SSC CGL, IBPS, RRB और State-level परीक्षाओं जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें।

Question 85

EN + हिं
GB What is the output: for(int i=2;i<10;i++) if(i%2==0&&i%3==0&&i%5==0) cout<
IN आउटपुट क्या है: for(int i=2;i
Nothing कुछ नहीं
6 6
30 30
Compile error संकलन त्रुटि
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) LCM(2,3,5)=30>10. No such i. Output: (nothing).
व्याख्या (हिन्दी) एलसीएम(2,3,5)=30>10. ऐसा कोई नहीं I आउटपुट: (कुछ नहीं)।
🎯 Exam Perspective
OOP Using C++ ("Control Statements" sub-topic) से जुड़ा यह सवाल उन students के लिए काम का है जो UPSC, SSC, Banking और Police भर्ती की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो।

Question 86

EN + हिं
GB 'What is the output: int x=5; if(x>0){x (1, 6, 74, 4, 4, 'What is the output: int n=0; for(int i=1;i*i<=25;i++) n++; cout<
IN 'आउटपुट क्या है: int x=5; यदि(x>0){x (1, 6, 74, 4, 4, 'आउटपुट क्या है: int n=0; for(int i=1;i*i
3 3
5: 1 5:1
9 9
25<=25. i=6: 36>25. n=5. Output: 5.', 0, '2026-05-25', '2026-05-25'), (1, 6, 74, 4, 4, 'What is the output: for(int i=0;i<3;i++) {int j=0; while(j<3) {cout<<i+j; j+=2;}}', 'i+j where j=0 2525. एन=5. आउटपुट: 5.', 0, '2026-05-25', '2026-05-25'), (1, 6, 74, 4, 4, 'आउटपुट क्या है: for(int i=0;i
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) j=2:2+2=4. Output: 021324.', 'See explanation.', 0, '2026-05-25', '2026-05-25'), (1, 6, 74, 4, 4, 'What is the output: int x=1; switch(x){default: cout<<\'D\'; case 1: cout<<\'A\'; break; case 2: cout<<\'B\';}'
व्याख्या (हिन्दी) जे=2:2+2=4. आउटपुट: 021324.', 'स्पष्टीकरण देखें।', 0, '2026-05-25', '2026-05-25'), (1, 6, 74, 4, 4, 'आउटपुट क्या है: int x=1; स्विच(x){डिफ़ॉल्ट: cout
🎯 Exam Perspective
Railway, SSC, Banking और Defence परीक्षाओं जैसी परीक्षाओं में OOP Using C++ ("Control Statements" sub-topic) से सवाल अक्सर पूछे जाते हैं। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें।

Question 87

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

Question 88

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

Question 89

EN + हिं
GB What is the output: int x=1; switch(x){default: cout<<'D'; case 1: cout<<'A'; break; case 2: cout<<'B';}
IN आउटपुट क्या है: int x=1; स्विच(x){डिफ़ॉल्ट: कॉउट
DA डीए
A
D डी
Compile error संकलन त्रुटि
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) x=1 matches case 1 (cases checked in order but match is by value): A then break. Output: A.
व्याख्या (हिन्दी) x=1 केस 1 से मेल खाता है (मामलों को क्रम में जांचा गया है लेकिन मिलान मूल्य के अनुसार है): ए फिर ब्रेक। आउटपुट: ए.
🎯 Exam Perspective
यह सवाल OOP Using C++ ("Control Statements" sub-topic) category का है, और UPSC, SSC, Banking और Police भर्ती के exam pattern में इस तरह के questions common हैं। Answer choose करने के बाद दिया गया explanation जरूर पढ़ें।

Question 90

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