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 106

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

Question 107

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

Question 108

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

Question 109

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

Question 110

EN + हिं
GB What is the output: int x=100; while(x>1){if(x%2==0)x/=2;else x=x*3+1;} cout<
IN आउटपुट क्या है: int x=100; while(x>1){if(x%2==0)x/=2;else x=x*3+1;} cout
1 1
Compile error संकलन त्रुटि
Undefined अपरिभाषित
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Collatz from 100 reaches 1. Output: 1.
व्याख्या (हिन्दी) 100 से Collatz 1 तक पहुंचता है। आउटपुट: 1।
🎯 Exam Perspective
SSC CGL, IBPS, RRB और State-level परीक्षाओं जैसी परीक्षाओं में OOP Using C++ ("Control Statements" sub-topic) से सवाल अक्सर पूछे जाते हैं। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें।

Question 111

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

Question 112

EN + हिं
GB What is the output: for(int i=0;i<5;i++) {int t=i*i; if(t>10) break; cout<
IN आउटपुट क्या है: for(int i=0;i10) breaking; अदालत
01491 01491
014 014
Compile error संकलन त्रुटि
Undefined अपरिभाषित
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) 0,1,4,9(break). Wait: 3^2=9<=10:print; 4^2=16>10:break. Output: 01491... 0,1,4,9. Output: 0149.
व्याख्या (हिन्दी) 0,1,4,9(ब्रेक)। रुको: 3^2=910:ब्रेक। आउटपुट: 01491... 0,1,4,9। आउटपुट: 0149.
🎯 Exam Perspective
OOP Using C++ ("Control Statements" sub-topic) के इस प्रश्न को कई प्रतियोगी परीक्षाओं जैसे Railway, SSC, Banking और Defence परीक्षाओं में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें।

Question 113

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

Question 114

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

Question 115

EN + हिं
GB What is the output: int cnt=0; for(int i=1;i<=50;i++) if(i%3==0||i%7==0) cnt++; cout<
IN आउटपुट क्या है: int cnt=0; for(int i=1;i
22 22
20 20
Compile error संकलन त्रुटि
Undefined अपरिभाषित
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Multiples of 3: 16; multiples of 7: 7; multiples of 21: 2. 16+7-2=21. Output: 21.
व्याख्या (हिन्दी) 3 के गुणज: 16; 7:7 के गुणज; 21 के गुणज: 2. 16+7-2=21. आउटपुट: 21.
🎯 Exam Perspective
OOP Using C++ ("Control Statements" sub-topic) से जुड़ा यह सवाल उन students के लिए काम का है जो UPSC, SSC, Banking और Police भर्ती की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो।

Question 116

EN + हिं
GB What is the output: string s=""; for(char c='a';c<='e';c++) s+=c; cout<
IN आउटपुट क्या है: स्ट्रिंग s='''; for(char c='a';c
abcde एबीसीडीई
ae
Compile error संकलन त्रुटि
Undefined अपरिभाषित
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Appends a,b,c,d,e. Output: abcde.
व्याख्या (हिन्दी) ए, बी, सी, डी, ई जोड़ता है। आउटपुट: एबीसीडीई.
🎯 Exam Perspective
Railway, SSC, Banking और Defence परीक्षाओं जैसी परीक्षाओं में OOP Using C++ ("Control Statements" sub-topic) से सवाल अक्सर पूछे जाते हैं। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें।

Question 117

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

Question 118

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

Question 119

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

Question 120

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