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 61

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

Question 62

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

Question 63

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

Question 64

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

Question 65

EN + हिं
GB What is the output: int x=7; if(x%2){if(x%3) cout<<'B'; else cout<<'C';} else cout<<'D';
IN आउटपुट क्या है: int x=7; if(x%2){if(x%3) cout
B बी
C सी
D डी
Compile error संकलन त्रुटि
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) 7%2=1(truthy),7%3=1(truthy): 'B'. Output: B.
व्याख्या (हिन्दी) 7%2=1(सत्य),7%3=1(सत्य): 'बी'। आउटपुट: बी.
🎯 Exam Perspective
यह सवाल OOP Using C++ ("Control Statements" sub-topic) category का है, और SSC CGL, IBPS, RRB और State-level परीक्षाओं के exam pattern में इस तरह के questions common हैं। Answer choose करने के बाद दिया गया explanation जरूर पढ़ें।

Question 66

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

Question 67

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

Question 68

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

Question 69

EN + हिं
GB What is the output: for(int i=0;i<3;i++) { int x=i*i; cout<
IN आउटपुट क्या है: for(int i=0;i
014 014
149 149
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 70

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

Question 71

EN + हिं
GB What is the output: int n=0; for(int i=2;i<20;i++){bool ok=true;for(int j=2;j*j<=i;j++) if(i%j==0){ok=false;break;} if(ok)n++;} cout<
IN आउटपुट क्या है: int n=0; for(int i=2;i
8 8
7 7
9 9
Compile error संकलन त्रुटि
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Primes < 20: 2,3,5,7,11,13,17,19 = 8. Output: 8.
व्याख्या (हिन्दी) अभाज्य <20: 2,3,5,7,11,13,17,19 = 8. आउटपुट: 8.
🎯 Exam Perspective
यह सवाल OOP Using C++ ("Control Statements" sub-topic) category का है, और Railway, SSC, Banking और Defence परीक्षाओं के exam pattern में इस तरह के questions common हैं। Answer choose करने के बाद दिया गया explanation जरूर पढ़ें।

Question 72

EN + हिं
GB 'What is the output: int x=10; while(x>0){if(x%4==0) {cout<
IN 'आउटपुट क्या है: int x=10; while(x>0){if(x%4==0) {cout
2%3=2 2%3=2
4%3=1. Output: 01201.', 0, '2026-05-25', '2026-05-25'), (1, 6, 74, 4, 4, 'What is the output: int g=0; for(int i=1;i<=5;i++) for(int j=1;j<=5;j++) if(__gcd(i,j)==1) g++; cout<<g;', 'Count coprime pairs 1-5?', 'Compile error', 'Compile error', '16', '16', '25', '25', 'Undefined', 'Undefined', NULL, 'option_b', 'Euler\'s totient: count pairs (i,j) in 1..5x1..5 where gcd=1. Tedious but ~16 pairs. Output: 16.' 4%3=1. आउटपुट: 01201.', 0, '2026-05-25', '2026-05-25'), (1, 6, 74, 4, 4, 'आउटपुट क्या है: int g=0; for(int i=1;i
2026-05-25 2026-05-25
✅ Correct Answer:
🎯 Exam Perspective
यह प्रश्न OOP Using C++ ("Control Statements" sub-topic) की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है। इस तरह के प्रश्न अक्सर SSC, Railway, Banking और State PCS जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें।

Question 73

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

Question 74

EN + हिं
GB What is the output: int g=0; for(int i=1;i<=5;i++) for(int j=1;j<=5;j++) if(__gcd(i,j)==1) g++; cout<
IN आउटपुट क्या है: int g=0; for(int i=1;i
Compile error संकलन त्रुटि
16 16
25 25
Undefined अपरिभाषित
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Euler's totient: count pairs (i,j) in 1..5x1..5 where gcd=1. Tedious but ~16 pairs. Output: 16.
व्याख्या (हिन्दी) यूलर का टोटिएंट: 1..5x1..5 में जोड़े (i,j) की गणना करें जहां gcd=1। थकाऊ लेकिन ~16 जोड़े। आउटपुट: 16.
🎯 Exam Perspective
UPSC, SSC, Banking और Police भर्ती जैसी परीक्षाओं में OOP Using C++ ("Control Statements" sub-topic) से सवाल अक्सर पूछे जाते हैं। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें।

Question 75

EN + हिं
GB What is the output: int x=1; for(int i=0;i<8;i++){if(x>100)break; x*=2;} cout<
IN आउटपुट क्या है: int x=1; for(int i=0;i100)ब्रेक; x*=2;} कोउट
128 128
64 64
256 256
Compile error संकलन त्रुटि
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) 1,2,4,8,16,32,64,128. 128>100: break after x=128. Output: 128.
व्याख्या (हिन्दी) 1,2,4,8,16,32,64,128. 128>100: x=128 के बाद ब्रेक। आउटपुट: 128.
🎯 Exam Perspective
अगर आप Railway, SSC, Banking और Defence परीक्षाओं की तैयारी कर रहे हैं, तो OOP Using C++ ("Control Statements" sub-topic) का यह topic आपके लिए महत्वपूर्ण है। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें।