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 91

EN + हिं
GB What is 'operator<=> auto' return?
IN 'ऑपरेटर ऑटो' रिटर्न क्या है?
Compiler deduces comparison category from member comparisons कंपाइलर सदस्य तुलनाओं से तुलना श्रेणी निकालता है
Always strong_ordering हमेशा मजबूत_आदेश देना
Runtime deduction रनटाइम कटौती
Same as bool बूल के समान
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) auto operator<=>(const A&)const=default; deduces weakest category of member types.
व्याख्या (हिन्दी) ऑटो ऑपरेटर(स्थिरांक A&) स्थिरांक=डिफ़ॉल्ट; सदस्य प्रकारों की सबसे कमजोर श्रेणी निकालता है।
🎯 Exam Perspective
OOP Using C++ ("Operators in C++" sub-topic) से जुड़ा यह सवाल उन students के लिए काम का है जो SSC, Railway, Banking और State PCS की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो।

Question 92

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

Question 93

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

Question 94

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

Question 95

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

Question 96

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

Question 97

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

Question 98

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

Question 99

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

Question 100

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

Question 101

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

Question 102

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

Question 103

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

Question 104

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

Question 105

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