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 106

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

Question 107

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

Question 108

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

Question 109

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

Question 110

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

Question 111

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

Question 112

EN + हिं
GB What is the output: int x=0; cout<<(x (1, 6, 73, 3, 4, 'What is the output: int x=16; while(x&(x-1)) x&=x-1; cout<
IN आउटपुट क्या है: int x=0; अदालत
2026-05-25 2026-05-25
✅ Correct Answer:
🎯 Exam Perspective
OOP Using C++ ("Operators in C++" sub-topic) के इस प्रश्न को कई प्रतियोगी परीक्षाओं जैसे SSC CGL, IBPS, RRB और State-level परीक्षाओं में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें।

Question 113

EN + हिं
GB What is the output: int x=16; while(x&(x-1)) x&=x-1; cout<
IN आउटपुट क्या है: int x=16; जबकि(x&(x-1)) x&=x-1; अदालत
16 16
8 8
1 1
Compile error संकलन त्रुटि
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) 16=10000; 16&15=0: already power of 2. Loop doesn't run. Output: 16.
व्याख्या (हिन्दी) 16=10000; 16&15=0: पहले से ही 2 की शक्ति। लूप नहीं चलता। आउटपुट: 16.
🎯 Exam Perspective
यह सवाल OOP Using C++ ("Operators in C++" sub-topic) category का है, और UPSC, SSC, Banking और Police भर्ती के exam pattern में इस तरह के questions common हैं। Answer choose करने के बाद दिया गया explanation जरूर पढ़ें।

Question 114

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

Question 115

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

Question 116

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

Question 117

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

Question 118

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

Question 119

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

Question 120

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