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 121

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

Question 122

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) 5 reversed is 5. Output: 5.
व्याख्या (हिन्दी) 5 का उलटा 5 है। आउटपुट: 5.
🎯 Exam Perspective
SSC CGL, IBPS, RRB और State-level परीक्षाओं जैसी परीक्षाओं में OOP Using C++ ("Control Statements" sub-topic) से सवाल अक्सर पूछे जाते हैं। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें।

Question 123

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

Question 124

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

Question 125

EN + हिं
GB What is the output: int x=255; while(x>0){cout<<(x&1); x>>=1;}
IN आउटपुट क्या है: int x=255; जबकि(x>0){cout=1;}
11111111 11111111
Compile error संकलन त्रुटि
Undefined अपरिभाषित
Reversed औंधा
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) 255=all 1s in 8 bits; printed LSB first: 11111111. Output: 11111111.
व्याख्या (हिन्दी) 255=8 बिट्स में सभी 1; मुद्रित एलएसबी पहले: 111111111। आउटपुट: 111111111।
🎯 Exam Perspective
यह सवाल OOP Using C++ ("Control Statements" sub-topic) category का है, और SSC, Railway, Banking और State PCS के exam pattern में इस तरह के questions common हैं। Answer choose करने के बाद दिया गया explanation जरूर पढ़ें।

Question 126

EN + हिं
GB What is the output: int s=0; for(int i=1;i<=100;i++) {if(i%5==0) s+=i; if(s>50) break;} cout<
IN आउटपुट क्या है: int s=0; for(int i=1;i50) breaking;} cout
55 55
50 50
Compile error संकलन त्रुटि
Undefined अपरिभाषित
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) 5+10+15+20=50; 50>50 false; +25=75... wait: s=5,10,15,20,25=75>50 break after 25? No: check after adding. s=5:!>50;s=15:!>50;s=30:!>50;s=50:!>50;s=75:>50 break. Output: 75.
व्याख्या (हिन्दी) 5+10+15+20=50; 50>50 झूठा; +25=75... प्रतीक्षा करें: s=5,10,15,20,25=75>25 के बाद 50 ब्रेक? नहीं: जोड़ने के बाद जांचें. s=5:!>50;s=15:!>50;s=30:!>50;s=50:!>50;s=75:>50 ब्रेक। आउटपुट: 75.
🎯 Exam Perspective
यह प्रश्न OOP Using C++ ("Control Statements" sub-topic) की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है। इस तरह के प्रश्न अक्सर SSC CGL, IBPS, RRB और State-level परीक्षाओं जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें।

Question 127

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

Question 128

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

Question 129

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

Question 130

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

Question 131

EN + हिं
GB What is the output: int n=12,d=0; while(n>0){d++;n/=10;} cout<
IN आउटपुट क्या है: int n=12,d=0; while(n>0){d++;n/=10;} कोउट
2 2
1 1
Compile error संकलन त्रुटि
Undefined अपरिभाषित
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) 12/10=1,d=1; 1/10=0,d=2; n=0 stop. Output: 2.
व्याख्या (हिन्दी) 12/10=1,डी=1; 1/10=0,डी=2; n=0 रुकें. आउटपुट: 2.
🎯 Exam Perspective
यह सवाल OOP Using C++ ("Control Statements" sub-topic) category का है, और UPSC, SSC, Banking और Police भर्ती के exam pattern में इस तरह के questions common हैं। Answer choose करने के बाद दिया गया explanation जरूर पढ़ें।

Question 132

EN + हिं
GB What is the output: int x=100,n=0; do{x=x/2+x%2; n++;}while(x>1); cout<
IN आउटपुट क्या है: int x=100,n=0; करो{x=x/2+x%2; n++;}जबकि(x>1); अदालत
71 71
61 61
Compile error संकलन त्रुटि
Undefined अपरिभाषित
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) 100->50->25->13->7->4->2->1. Steps: 7. Output: 71.
व्याख्या (हिन्दी) 100->50->25->13->7->4->2->1. चरण: 7. आउटपुट: 71.
🎯 Exam Perspective
यह प्रश्न OOP Using C++ ("Control Statements" sub-topic) की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है। इस तरह के प्रश्न अक्सर Railway, SSC, Banking और Defence परीक्षाओं जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें।

Question 133

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