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 76

EN + हिं
GB What is 'std::numeric_limits::digits'?
IN 'std::numeric_limits::digits' क्या है?
Number of binary digits (bits-1 for signed) बाइनरी अंकों की संख्या (हस्ताक्षरित के लिए बिट्स-1)
Total bits कुल बिट्स
Decimal digits दशमलव अंक
Significant digits महत्वपूर्ण अंक
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) digits for signed int=31 (excludes sign bit); for unsigned int=32.
व्याख्या (हिन्दी) हस्ताक्षरित int=31 के लिए अंक (साइन बिट को छोड़कर); अहस्ताक्षरित int=32 के लिए।
🎯 Exam Perspective
OOP Using C++ ("Variables and Data Types" sub-topic) के इस प्रश्न को कई प्रतियोगी परीक्षाओं जैसे Railway, SSC, Banking और Defence परीक्षाओं में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें।

Question 77

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

Question 78

EN + हिं
GB What is 'volatile const' combination?
IN 'वाष्पशील स्थिरांक' संयोजन क्या है?
Read-only variable whose value may change externally केवल पढ़ने योग्य वैरिएबल जिसका मान बाह्य रूप से बदल सकता है
Useless combination बेकार संयोजन
Compile error संकलन त्रुटि
Same as const स्थिरांक के समान
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) const volatile int reg: can't modify in code but hardware may change it; must read from memory each time.
व्याख्या (हिन्दी) const volatile int reg: कोड में संशोधन नहीं किया जा सकता लेकिन हार्डवेयर इसे बदल सकता है; हर बार याददाश्त से पढ़ना चाहिए।
🎯 Exam Perspective
यह प्रश्न OOP Using C++ ("Variables and Data Types" sub-topic) की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है। इस तरह के प्रश्न अक्सर SSC CGL, IBPS, RRB और State-level परीक्षाओं जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें।

Question 79

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

Question 80

EN + हिं
GB What is 'std::tuple_size'?
IN 'std::tuple_size' क्या है?
Compile-time number of elements in tuple/pair/array टपल/जोड़ी/सरणी में तत्वों की संकलन-समय संख्या
Runtime size रनटाइम आकार
Iterator count पुनरावर्तक गिनती
Type count गिनती टाइप करें
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) tuple_size>::value = 3 at compile time.
व्याख्या (हिन्दी) संकलन समय पर Tuple_size::value = 3।
🎯 Exam Perspective
Railway, SSC, Banking और Defence परीक्षाओं जैसी परीक्षाओं में OOP Using C++ ("Variables and Data Types" sub-topic) से सवाल अक्सर पूछे जाते हैं। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें।

Question 81

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

Question 82

EN + हिं
GB What is 'std::get(tuple)'?
IN 'std::get(tuple)' क्या है?
Access Nth element of tuple at compile time संकलन समय पर टुपल के Nवें तत्व तक पहुंचें
Runtime element access रनटाइम तत्व पहुंच
Type-erased access टाइप-मिटाई गई पहुंच
Iterator access इटरेटर पहुंच
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) auto t=make_tuple(1,2.0,'a'); std::get<1>(t)=2.0.
व्याख्या (हिन्दी) ऑटो t=make_tuple(1,2.0,'a'); std::get(t)=2.0.
🎯 Exam Perspective
OOP Using C++ ("Variables and Data Types" sub-topic) के इस प्रश्न को कई प्रतियोगी परीक्षाओं जैसे SSC CGL, IBPS, RRB और State-level परीक्षाओं में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें।

Question 83

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

Question 84

EN + हिं
GB What is 'std::variant::visit'?
IN 'std::variant::visit' क्या है?
Calls correct overload for currently held type वर्तमान में रखे गए प्रकार के लिए सही ओवरलोड कॉल करता है
Runtime type switch रनटाइम प्रकार स्विच
Dynamic dispatch गतिशील प्रेषण
Same as get जैसा मिलता है वैसा ही
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) std::visit(overloaded{...}, v) applies the matching handler for the active type in v.
व्याख्या (हिन्दी) std::visit(overloaded{...}, v) v में सक्रिय प्रकार के लिए मिलान हैंडलर लागू करता है।
🎯 Exam Perspective
यह प्रश्न OOP Using C++ ("Variables and Data Types" sub-topic) की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है। इस तरह के प्रश्न अक्सर Railway, SSC, Banking और Defence परीक्षाओं जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें।

Question 85

EN + हिं
GB What is the output: variant v=3.14; cout<(v);
IN आउटपुट क्या है: वैरिएंट v=3.14; अदालत
1 1
Compile error संकलन त्रुटि
Undefined अपरिभाषित
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) v holds double. holds_alternative(v)=true=1. Output: 1.
व्याख्या (हिन्दी) v दोगुना रखता है। धारक_वैकल्पिक(v)=सत्य=1. आउटपुट: 1.
🎯 Exam Perspective
OOP Using C++ ("Variables and Data Types" sub-topic) से जुड़ा यह सवाल उन students के लिए काम का है जो SSC, Railway, Banking और State PCS की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो।

Question 86

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

Question 87

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

Question 88

EN + हिं
GB What is 'std::integral_constant'?
IN 'std::integral_constant' क्या है?
Compile-time constant value as a type एक प्रकार के रूप में संकलन-समय स्थिर मान
A runtime constant एक रनटाइम स्थिरांक
A variable template एक परिवर्तनीय टेम्पलेट
A typedef एक टाइपडिफ़
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) integral_constant::value=5; used in TMP to pass values as types.
व्याख्या (हिन्दी) अभिन्न_स्थिरांक::मान=5; TMP में मानों को प्रकारों के रूप में पारित करने के लिए उपयोग किया जाता है।
🎯 Exam Perspective
OOP Using C++ ("Variables and Data Types" sub-topic) के इस प्रश्न को कई प्रतियोगी परीक्षाओं जैसे UPSC, SSC, Banking और Police भर्ती में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें।

Question 89

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

Question 90

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