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 76

EN + हिं
GB What is the output: int x=5; cout<<(x>0?(x>10?'H':'M'):'L');
IN आउटपुट क्या है: int x=5; cout10?'H':'M'):'L');
M एम
H एच
L एल
Compile error संकलन त्रुटि
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) x>0=true; x>10=false; returns 'M'. Output: M.
व्याख्या (हिन्दी) x>0=सत्य; x>10=गलत; 'एम' लौटाता है। आउटपुट: एम.
🎯 Exam Perspective
OOP Using C++ ("Operators in C++" sub-topic) के इस प्रश्न को कई प्रतियोगी परीक्षाओं जैसे SSC, Railway, Banking और State PCS में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें।

Question 77

EN + हिं
GB What is the output: int a=1,b=0; cout<<(a|b)<<(a&b)<<(a^b);
IN आउटपुट क्या है: int a=1,b=0; अदालत
101 101
010 010
100 100
Compile error संकलन त्रुटि
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) 1|0=1, 1&0=0, 1^0=1. Output: 101.
व्याख्या (हिन्दी) 1|0=1, 1&0=0, 1^0=1. आउटपुट: 101.
🎯 Exam Perspective
यह सवाल OOP Using C++ ("Operators in C++" sub-topic) category का है, और SSC CGL, IBPS, RRB और State-level परीक्षाओं के exam pattern में इस तरह के questions common हैं। Answer choose करने के बाद दिया गया explanation जरूर पढ़ें।

Question 78

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

Question 79

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

Question 80

EN + हिं
GB What is the output: int x=5; cout<<(x>0&&cout<<'Y');
IN आउटपुट क्या है: int x=5; अदालत
Y1 Y1
1Y 1 वर्ष
Compile error संकलन त्रुटि
Undefined अपरिभाषित
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) x>0=true; right side: cout<<'Y' prints Y and returns cout (truthy). cout<<1 prints 1. Total: Y1.
व्याख्या (हिन्दी) x>0=सत्य; दाईं ओर: कॉउट
🎯 Exam Perspective
SSC, Railway, Banking और State PCS जैसी परीक्षाओं में OOP Using C++ ("Operators in C++" sub-topic) से सवाल अक्सर पूछे जाते हैं। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें।

Question 81

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

Question 82

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

Question 83

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

Question 84

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

Question 85

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

Question 86

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

Question 87

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

Question 88

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

Question 89

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

Question 90

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