61 Question 61 EN + हिं GB What is 'attribute [[nodiscard]]'? IN 'विशेषता [[नोडिस्कार्ड]]' क्या है? A Warns if return value is discarded अगर रिटर्न वैल्यू खारिज कर दिया जाए तो चेतावनी देता है B Makes function constexpr फ़ंक्शन कॉन्स्टेक्सपीआर बनाता है C Prevents inlining इनलाइनिंग को रोकता है D Marks deprecated function अस्वीकृत फ़ंक्शन को चिह्नित करता है ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) [[nodiscard]] causes compiler warning if caller ignores return value; useful for error codes. व्याख्या (हिन्दी) [[नोडिस्कार्ड]] यदि कॉलर रिटर्न वैल्यू को अनदेखा करता है तो कंपाइलर चेतावनी का कारण बनता है; त्रुटि कोड के लिए उपयोगी. 🎯 Exam Perspective OOP Using C++ ("Introduction to C++" sub-topic) से जुड़ा यह सवाल उन students के लिए काम का है जो Railway, SSC, Banking और Defence परीक्षाओं की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो। 🔗 Related Questions What is the output: int x=10; cout What is 'std::span' zero-overhead guarantee? What is 'likely' and 'unlikely' attributes in C++20? 📚 Related Topic Variables and Data Types (160) Operators in C++ (163) Control Statements (133)
62 Question 62 EN + हिं GB What is the output: int x=3; cout<<(x<<1|1); IN आउटपुट क्या है: int x=3; अदालत A 7 7 B 6 6 C 3 3 D Compile error संकलन त्रुटि ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) 3<<1=6=110. 110|001=111=7. Output: 7. व्याख्या (हिन्दी) 3 🎯 Exam Perspective SSC, Railway, Banking और State PCS जैसी परीक्षाओं में OOP Using C++ ("Introduction to C++" sub-topic) से सवाल अक्सर पूछे जाते हैं। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें। 🔗 Related Questions What is 'std::source_location' in C++20? What is 'attribute [[nodiscard]]'? What is 'memory order' in atomics? 📚 Related Topic Variables and Data Types (160) Operators in C++ (163) Control Statements (133)
63 Question 63 EN + हिं GB What is 'likely' and 'unlikely' attributes in C++20? IN C++20 में 'संभावित' और 'असंभावित' विशेषताएँ क्या हैं? A Hints to compiler about branch probability शाखा संभाव्यता के बारे में संकलक को संकेत B Forces branch elimination बल शाखा उन्मूलन C Runtime branch prediction रनटाइम शाखा भविष्यवाणी D Constexpr branches कॉन्स्टेक्सपीआर शाखाएँ ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) [[likely]]/[[unlikely]] on if/switch branches hint branch predictor; may improve performance. व्याख्या (हिन्दी) [[संभावना]]/[[संभावना नहीं]] अगर/स्विच शाखाएं संकेत शाखा भविष्यवक्ता पर; प्रदर्शन में सुधार हो सकता है. 🎯 Exam Perspective अगर आप SSC CGL, IBPS, RRB और State-level परीक्षाओं की तैयारी कर रहे हैं, तो OOP Using C++ ("Introduction to C++" sub-topic) का यह topic आपके लिए महत्वपूर्ण है। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें। 🔗 Related Questions What is the output: int x=10; cout What is the output: int x=5; cout What is the output: int x=3; cout 📚 Related Topic Variables and Data Types (160) Operators in C++ (163) Control Statements (133)
64 Question 64 EN + हिं GB What is the output: auto x=42u; cout< IN आउटपुट क्या है: ऑटो x=42u; अदालत A 4 4 B 8 8 C 2 2 D Compile error संकलन त्रुटि ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) 42u is unsigned int; sizeof=4. Output: 4. व्याख्या (हिन्दी) 42u अहस्ताक्षरित int है; आकार=4. आउटपुट: 4. 🎯 Exam Perspective OOP Using C++ ("Introduction to C++" sub-topic) के इस प्रश्न को कई प्रतियोगी परीक्षाओं जैसे UPSC, SSC, Banking और Police भर्ती में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें। 🔗 Related Questions What is the output: int x=10; cout What is 'std::source_location' in C++20? What is 'likely' and 'unlikely' attributes in C++20? 📚 Related Topic Variables and Data Types (160) Operators in C++ (163) Control Statements (133)
65 Question 65 EN + हिं GB What is 'ODR-use'? IN 'ओडीआर-उपयोग' क्या है? A Using a variable/function in a way requiring its definition किसी वेरिएबल/फ़ंक्शन का इस प्रकार उपयोग करना कि उसकी परिभाषा आवश्यक हो B Object definition rule वस्तु परिभाषा नियम C Overload definition requirement अधिभार परिभाषा आवश्यकता D Override dispatch rule प्रेषण नियम को ओवरराइड करें ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) ODR-use: if you take address of or bind reference to an entity, it must have exactly one definition. व्याख्या (हिन्दी) ओडीआर-उपयोग: यदि आप किसी इकाई का पता लेते हैं या उसका संदर्भ लेते हैं, तो इसकी बिल्कुल एक परिभाषा होनी चाहिए। 🎯 Exam Perspective यह सवाल OOP Using C++ ("Introduction to C++" sub-topic) category का है, और Railway, SSC, Banking और Defence परीक्षाओं के exam pattern में इस तरह के questions common हैं। Answer choose करने के बाद दिया गया explanation जरूर पढ़ें। 🔗 Related Questions What is the output: int x=5; cout What is 'attribute [[nodiscard]]'? What is the output: auto x=42u; cout 📚 Related Topic Variables and Data Types (160) Operators in C++ (163) Control Statements (133)
66 Question 66 EN + हिं GB What is the output: int x=10; cout<<(x-=3)< IN आउटपुट क्या है: int x=10; अदालत A 77 77 B 710 710 C Undefined अपरिभाषित D Compile error संकलन त्रुटि ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) x-=3 sets x=7, returns 7. C++17 left-to-right: 7 then 7. Output: 77. व्याख्या (हिन्दी) x-=3 सेट x=7, रिटर्न 7. C++17 बाएँ से दाएँ: 7 फिर 7. आउटपुट: 77. 🎯 Exam Perspective यह प्रश्न OOP Using C++ ("Introduction to C++" sub-topic) की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है। इस तरह के प्रश्न अक्सर SSC, Railway, Banking और State PCS जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें। 🔗 Related Questions What is the output: int x=5; int y=x; x=x^y; y=x^y; x=x... What is the output: int x=5; cout What is the output: int x=255; cout 📚 Related Topic Variables and Data Types (160) Operators in C++ (163) Control Statements (133)
67 Question 67 EN + हिं GB What is 'std::source_location' in C++20? IN C++20 में 'std::source_location' क्या है? A Provides file, line, function info at compile time संकलन समय पर फ़ाइल, लाइन, फ़ंक्शन जानकारी प्रदान करता है B Runtime stack trace रनटाइम स्टैक ट्रेस C Debugger integration डिबगर एकीकरण D Exception location अपवाद स्थान ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) std::source_location::current() captures file name, line number, and function name at compile time. व्याख्या (हिन्दी) std::source_location::current() संकलन समय पर फ़ाइल नाम, लाइन नंबर और फ़ंक्शन नाम कैप्चर करता है। 🎯 Exam Perspective OOP Using C++ ("Introduction to C++" sub-topic) से जुड़ा यह सवाल उन students के लिए काम का है जो SSC CGL, IBPS, RRB और State-level परीक्षाओं की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो। 🔗 Related Questions What is 'std::expected' in C++23? What is 'ODR-use'? What is the output: int x=5; cout 📚 Related Topic Variables and Data Types (160) Operators in C++ (163) Control Statements (133)
68 Question 68 EN + हिं GB What is the output: int x=5; int y=x; x=x^y; y=x^y; x=x^y; cout< IN आउटपुट क्या है: int x=5; int y=x; x=x^y; y=x^y; x=x^y; अदालत A 05 05 B 55 55 C 50 50 D Compile error संकलन त्रुटि ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) x=y=5. x^=y=0; y^=x=5; x^=y=5. Swap of equal values: x=5,y=5. Output: 55. व्याख्या (हिन्दी) एक्स=वाई=5. x^=y=0; y^=x=5; x^=y=5. समान मानों की अदला-बदली: x=5,y=5. आउटपुट: 55. 🎯 Exam Perspective UPSC, SSC, Banking और Police भर्ती जैसी परीक्षाओं में OOP Using C++ ("Introduction to C++" sub-topic) से सवाल अक्सर पूछे जाते हैं। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें। 🔗 Related Questions What is 'std::span' zero-overhead guarantee? What is the output: auto x=42u; cout What is the output: int x=10; cout 📚 Related Topic Variables and Data Types (160) Operators in C++ (163) Control Statements (133)
69 Question 69 EN + हिं GB What is 'memory order' in atomics? IN परमाणु विज्ञान में 'मेमोरी ऑर्डर' क्या है? A Specifies synchronization strength of atomic operation परमाणु संचालन की तुल्यकालन शक्ति निर्दिष्ट करता है B Cache line order कैश लाइन ऑर्डर C Instruction ordering अनुदेश आदेश D Thread priority थ्रेड प्राथमिकता ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) Memory orders (relaxed, acquire, release, seq_cst) control visibility of memory operations across threads. व्याख्या (हिन्दी) मेमोरी ऑर्डर (आराम, अधिग्रहण, रिलीज, seq_cst) थ्रेड्स में मेमोरी ऑपरेशंस की दृश्यता को नियंत्रित करते हैं। 🎯 Exam Perspective अगर आप Railway, SSC, Banking और Defence परीक्षाओं की तैयारी कर रहे हैं, तो OOP Using C++ ("Introduction to C++" sub-topic) का यह topic आपके लिए महत्वपूर्ण है। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें। 🔗 Related Questions What is the output: auto x=42u; cout What is 'std::span' zero-overhead guarantee? What is the output: int x=5; cout 📚 Related Topic Variables and Data Types (160) Operators in C++ (163) Control Statements (133)
70 Question 70 EN + हिं GB What is the output: int x=5; cout<<(x+0.0==5.0); IN आउटपुट क्या है: int x=5; अदालत A 1 1 C Undefined अपरिभाषित D Compile error संकलन त्रुटि ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) 5 converts to 5.0 exactly; 5.0==5.0=true=1. Output: 1. व्याख्या (हिन्दी) 5 बिल्कुल 5.0 में परिवर्तित हो जाता है; 5.0==5.0=सत्य=1. आउटपुट: 1. 🎯 Exam Perspective OOP Using C++ ("Introduction to C++" sub-topic) के इस प्रश्न को कई प्रतियोगी परीक्षाओं जैसे SSC, Railway, Banking और State PCS में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें। 🔗 Related Questions What is 'std::span' zero-overhead guarantee? What is the output: auto x=42u; cout What is 'std::bit_cast' in C++20? 📚 Related Topic Variables and Data Types (160) Operators in C++ (163) Control Statements (133)
71 Question 71 EN + हिं GB What is 'std::bit_cast' in C++20? IN C++20 में 'std::bit_cast' क्या है? A Reinterprets bits of one type as another safely एक प्रकार के बिट्स को दूसरे प्रकार के बिट्स के रूप में सुरक्षित रूप से पुनर्व्याख्यायित करता है B Same as reinterpret_cast पुनर्व्याख्या_कास्ट के समान C Runtime cast रनटाइम कास्ट D A union hack एक यूनियन हैक ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) std::bit_cast(v) reinterprets the bit representation; safe type punning alternative to memcpy. व्याख्या (हिन्दी) std::bit_cast(v) बिट प्रतिनिधित्व की पुनर्व्याख्या करता है; मेम्सीपीई का सुरक्षित प्रकार का पनिंग विकल्प। 🎯 Exam Perspective यह सवाल OOP Using C++ ("Introduction to C++" sub-topic) category का है, और SSC CGL, IBPS, RRB और State-level परीक्षाओं के exam pattern में इस तरह के questions common हैं। Answer choose करने के बाद दिया गया explanation जरूर पढ़ें। 🔗 Related Questions What is 'std::expected' in C++23? What is the output: int x=255; cout What is the output: int x=3; cout 📚 Related Topic Variables and Data Types (160) Operators in C++ (163) Control Statements (133)
72 Question 72 EN + हिं GB What is the output: int x=255; cout<<(x&0xF)<<((x>>4)&0xF); IN आउटपुट क्या है: int x=255; अदालत A 1515 1515 B ff सीमांत बल C Compile error संकलन त्रुटि D Undefined अपरिभाषित ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) 0xFF&0xF=15, (0xFF>>4)&0xF=15. Output: 1515. व्याख्या (हिन्दी) 0xFF&0xF=15, (0xFF>>4)&0xF=15. आउटपुट: 1515. 🎯 Exam Perspective यह प्रश्न OOP Using C++ ("Introduction to C++" sub-topic) की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है। इस तरह के प्रश्न अक्सर UPSC, SSC, Banking और Police भर्ती जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें। 🔗 Related Questions What is the output: int x=5; cout What is 'std::expected' in C++23? What is the output: int x=5; cout 📚 Related Topic Variables and Data Types (160) Operators in C++ (163) Control Statements (133)
73 Question 73 EN + हिं GB What is 'std::span' zero-overhead guarantee? IN 'std::span' शून्य-ओवरहेड गारंटी क्या है? A Non-owning view adds no allocation overhead गैर-स्वामित्व वाला दृश्य कोई आवंटन ओवरहेड नहीं जोड़ता है B Faster than vector वेक्टर से भी तेज़ C Compile-time size संकलन-समय का आकार D Thread-safe सूत की अलमारी ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) std::span stores only pointer+size; no heap allocation; same performance as raw pointer+size pair. व्याख्या (हिन्दी) std::span केवल पॉइंटर+आकार को संग्रहीत करता है; कोई ढेर आवंटन नहीं; कच्चे सूचक+आकार जोड़ी के समान प्रदर्शन। 🎯 Exam Perspective OOP Using C++ ("Introduction to C++" sub-topic) से जुड़ा यह सवाल उन students के लिए काम का है जो Railway, SSC, Banking और Defence परीक्षाओं की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो। 🔗 Related Questions What is the output: int x=255; cout What is 'std::source_location' in C++20? What is 'memory order' in atomics? 📚 Related Topic Variables and Data Types (160) Operators in C++ (163) Control Statements (133)
74 Question 74 EN + हिं GB What is the output: int x=5; cout<<(x^x^x); IN आउटपुट क्या है: int x=5; अदालत A 5 5 C 10 10 D Compile error संकलन त्रुटि ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) x^x=0, 0^x=x=5. Output: 5. व्याख्या (हिन्दी) x^x=0, 0^x=x=5. आउटपुट: 5. 🎯 Exam Perspective SSC, Railway, Banking और State PCS जैसी परीक्षाओं में OOP Using C++ ("Introduction to C++" sub-topic) से सवाल अक्सर पूछे जाते हैं। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें। 🔗 Related Questions What is the output: int x=3; cout What is 'std::span' zero-overhead guarantee? What is the output: int x=255; cout 📚 Related Topic Variables and Data Types (160) Operators in C++ (163) Control Statements (133)
75 Question 75 EN + हिं GB What is 'std::expected' in C++23? IN C++23 में 'std::expected' क्या है? A Return type holding value or error without exceptions बिना किसी अपवाद के रिटर्न प्रकार होल्डिंग मान या त्रुटि B A variant type एक भिन्न प्रकार C An optional type एक वैकल्पिक प्रकार D An exception wrapper एक अपवाद आवरण ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) std::expected holds either T (success) or E (error); alternative to exceptions for error handling. व्याख्या (हिन्दी) std::expected या तो T (सफलता) या E (त्रुटि) रखता है; त्रुटि प्रबंधन के लिए अपवादों का विकल्प। 🎯 Exam Perspective अगर आप SSC CGL, IBPS, RRB और State-level परीक्षाओं की तैयारी कर रहे हैं, तो OOP Using C++ ("Introduction to C++" sub-topic) का यह topic आपके लिए महत्वपूर्ण है। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें। 🔗 Related Questions What is 'std::source_location' in C++20? What is the output: int x=3; cout What is 'attribute [[nodiscard]]'? 📚 Related Topic Variables and Data Types (160) Operators in C++ (163) Control Statements (133)