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 151

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

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

Question 153

EN + हिं
GB What is the output: int x=100; cout<<(x/=3)<
IN आउटपुट क्या है: int x=100; अदालत
3333 3333
10033 10033
Compile error संकलन त्रुटि
Undefined अपरिभाषित
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) x/=3: x=33. C++17 left-to-right: print 33, then print 33. Output: 3333.
व्याख्या (हिन्दी) x/=3: x=33. C++17 बाएँ से दाएँ: 33 प्रिंट करें, फिर 33 प्रिंट करें। आउटपुट: 3333।
🎯 Exam Perspective
अगर आप Railway, SSC, Banking और Defence परीक्षाओं की तैयारी कर रहे हैं, तो OOP Using C++ ("Variables and Data Types" sub-topic) का यह topic आपके लिए महत्वपूर्ण है। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें।

Question 154

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

Question 155

EN + हिं
GB What is the output: int x=5; cout<<(+x)<<(-x)<<(~x)<<(!x);
IN आउटपुट क्या है: int x=5; अदालत
5-5-60 5-5-60
5-50 5-50
Compile error संकलन त्रुटि
Undefined अपरिभाषित
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) +5=5, -5=-5, ~5=-6, !5=0. Output: 5-5-60.
व्याख्या (हिन्दी) +5=5, -5=-5, ~5=-6, !5=0. आउटपुट: 5-5-60.
🎯 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 156

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

Question 157

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

Question 158

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

Question 159

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

Question 160

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