OOP Using C++ — MCQ Practice

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

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

Question 136

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

Question 137

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

Question 138

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

Question 139

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

Question 140

EN + हिं
GB What is the output: double d=1.23456789; cout<
IN आउटपुट क्या है: डबल d=1.23456789; अदालत
1.2346 1.2346
1.2345 1.2345
Compile error संकलन त्रुटि
Undefined अपरिभाषित
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Rounds 1.23456789 to 4 places: 1.2346. Output: 1.2346.
व्याख्या (हिन्दी) राउंड 1.23456789 से 4 स्थानों तक: 1.2346। आउटपुट: 1.2346.
🎯 Exam Perspective
UPSC, SSC, Banking और Police भर्ती जैसी परीक्षाओं में OOP Using C++ ("Variables and Data Types" sub-topic) से सवाल अक्सर पूछे जाते हैं। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें।

Question 141

EN + हिं
GB What is the output: float f=1.0f/3.0f; cout<<(f==1.0f/3.0f);
IN आउटपुट क्या है: फ्लोट f=1.0f/3.0f; अदालत
1 1
Compile error संकलन त्रुटि
Undefined अपरिभाषित
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Same computation gives same float. Output: 1.
व्याख्या (हिन्दी) समान गणना समान फ़्लोट देती है. आउटपुट: 1.
🎯 Exam Perspective
अगर आप Railway, SSC, Banking और Defence परीक्षाओं की तैयारी कर रहे हैं, तो OOP Using C++ ("Variables and Data Types" sub-topic) का यह topic आपके लिए महत्वपूर्ण है। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें।

Question 142

EN + हिं
GB What is the output: int x=5; cout<
IN आउटपुट क्या है: int x=5; अदालत
d डी
i मैं
Compile error संकलन त्रुटि
Undefined अपरिभाषित
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) int+double promotes to double. typeid=double='d'. Output: d.
व्याख्या (हिन्दी) int+double दोगुना करने को बढ़ावा देता है। टाइपआईडी=डबल='डी'। आउटपुट: डी.
🎯 Exam Perspective
OOP Using C++ ("Variables and Data Types" sub-topic) के इस प्रश्न को कई प्रतियोगी परीक्षाओं जैसे SSC, Railway, Banking और State PCS में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें।

Question 143

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

Question 144

EN + हिं
GB What is the output: int x=10; int y=x; x=20; cout<
IN आउटपुट क्या है: int x=10; int y=x; एक्स=20; अदालत
10 10
20 20
Compile error संकलन त्रुटि
Undefined अपरिभाषित
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) y is copy of original x=10. x changes don't affect y. Output: 10.
व्याख्या (हिन्दी) y मूल x=10 की प्रतिलिपि है। x परिवर्तन y को प्रभावित नहीं करते. आउटपुट: 10.
🎯 Exam Perspective
यह प्रश्न OOP Using C++ ("Variables and Data Types" sub-topic) की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है। इस तरह के प्रश्न अक्सर UPSC, SSC, Banking और Police भर्ती जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें।

Question 145

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

Question 146

EN + हिं
GB What is the output: enum E{A=1,B=2,C=4}; cout<<(A|B|C);
IN आउटपुट क्या है: enum E{A=1,B=2,C=4}; अदालत
7 7
3 3
Compile error संकलन त्रुटि
Undefined अपरिभाषित
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) 1|2|4=7. Output: 7.
व्याख्या (हिन्दी) 1|2|4=7. आउटपुट: 7.
🎯 Exam Perspective
SSC, Railway, Banking और State PCS जैसी परीक्षाओं में OOP Using C++ ("Variables and Data Types" sub-topic) से सवाल अक्सर पूछे जाते हैं। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें।

Question 147

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

Question 148

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

Question 149

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

Question 150

EN + हिं
GB What is the output: long double ld=1.0L/3.0L; cout<<(ld>1.0/3.0);
IN आउटपुट क्या है: लंबा डबल ld=1.0L/3.0L; अदालत
1 1
Compile error संकलन त्रुटि
Undefined अपरिभाषित
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) long double has more precision; may differ from double. Result is implementation-defined but typically 1. Output: 1.
व्याख्या (हिन्दी) लंबे डबल में अधिक सटीकता होती है; डबल से भिन्न हो सकता है. परिणाम कार्यान्वयन-परिभाषित है लेकिन आम तौर पर 1. आउटपुट: 1.
🎯 Exam Perspective
यह प्रश्न OOP Using C++ ("Variables and Data Types" sub-topic) की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है। इस तरह के प्रश्न अक्सर SSC, Railway, Banking और State PCS जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें।