OOP Using C++ — MCQ Practice

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

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

Question 136

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

Question 137

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

Question 138

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

Question 139

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

Question 140

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

Question 141

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

Question 142

EN + हिं
GB What is the output: int x=10; x+=x; x-=5; x*=2; cout<
IN आउटपुट क्या है: int x=10; x+=x; एक्स-=5; एक्स*=2; अदालत
30 30
25 25
Compile error संकलन त्रुटि
Undefined अपरिभाषित
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) x=10; x+=10=20; x-=5=15; x*=2=30. Output: 30.
व्याख्या (हिन्दी) एक्स=10; x+=10=20; x-=5=15; x*=2=30. Output: 30.
🎯 Exam Perspective
OOP Using C++ ("Operators in C++" sub-topic) के इस प्रश्न को कई प्रतियोगी परीक्षाओं जैसे SSC CGL, IBPS, RRB और State-level परीक्षाओं में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें।

Question 143

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

Question 144

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

Question 145

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

Question 146

EN + हिं
GB What is the output: int x=255; cout<<(x&0xF)<<((x>>4)&0xF);
IN आउटपुट क्या है: int x=255; अदालत
1515 1515
0F0F 0एफ0एफ
Compile error संकलन त्रुटि
Undefined अपरिभाषित
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) 0xFF&0xF=15; 0xF>>4&0xF=15. Output: 1515.
व्याख्या (हिन्दी) 0xFF&0xF=15; 0xF>>4&0xF=15. आउटपुट: 1515.
🎯 Exam Perspective
SSC CGL, IBPS, RRB और State-level परीक्षाओं जैसी परीक्षाओं में OOP Using C++ ("Operators in C++" sub-topic) से सवाल अक्सर पूछे जाते हैं। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें।

Question 147

EN + हिं
GB What is the output: int x=5,y=10; cout<<(xy?x:y);
IN आउटपुट क्या है: int x=5,y=10; अदालत
5 10 5 10
10 5 10 5
Compile error संकलन त्रुटि
Undefined अपरिभाषित
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) min=5, max=10. Output: 5 10.
व्याख्या (हिन्दी) न्यूनतम=5, अधिकतम=10. आउटपुट: 5 10.
🎯 Exam Perspective
अगर आप UPSC, SSC, Banking और Police भर्ती की तैयारी कर रहे हैं, तो OOP Using C++ ("Operators in C++" sub-topic) का यह topic आपके लिए महत्वपूर्ण है। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें।

Question 148

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

Question 149

EN + हिं
GB What is the output: int x=2; for(int i=0;i<4;i++) x=x<<1|1; cout<
IN आउटपुट क्या है: int x=2; for(int i=0;i
63 63
31 31
Compile error संकलन त्रुटि
Undefined अपरिभाषित
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) 2->5->11->23->47. Let me recheck: x=2=010. i=0:010<<1|1=101=5; i=1:101<<1|1=1011=11; i=2:1011<<1|1=10111=23; i=3:10111<<1|1=101111=47. Output: 47.
व्याख्या (हिन्दी) 2->5->11->23->47. मुझे दोबारा जांच करने दीजिए: x=2=010. मैं=0:010
🎯 Exam Perspective
यह सवाल OOP Using C++ ("Operators in C++" sub-topic) category का है, और SSC, Railway, Banking और State PCS के exam pattern में इस तरह के questions common हैं। Answer choose करने के बाद दिया गया explanation जरूर पढ़ें।

Question 150

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