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 61

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

Question 62

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

Question 63

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

Question 64

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

Question 65

EN + हिं
GB What is the output: int x=5; cout<<(x&-1);
IN आउटपुट क्या है: int x=5; अदालत
5 5
-1 -1
Compile error संकलन त्रुटि
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) -1 all bits set; x&(-1)=x=5. Output: 5.
व्याख्या (हिन्दी) -1 सभी बिट्स सेट; x&(-1)=x=5. आउटपुट: 5.
🎯 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 66

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

Question 67

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

Question 68

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

Question 69

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

Question 70

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

Question 71

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

Question 72

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

Question 73

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

Question 74

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

Question 75

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