31 Question 31 EN + हिं GB What is the output: int x = -5; cout << (x >> 1); IN आउटपुट क्या है: int x = -5; कॉउट > 1); A -3 -3 B -2 -2 C -1 -1 D Undefined अपरिभाषित ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) Right-shifting a negative signed integer is implementation-defined. On most platforms (arithmetic shift): -5>>1 = -3 (rounds toward negative infinity). व्याख्या (हिन्दी) एक नकारात्मक हस्ताक्षरित पूर्णांक को राइट-शिफ्टिंग कार्यान्वयन-परिभाषित है। अधिकांश प्लेटफ़ॉर्म पर (अंकगणितीय बदलाव): -5>>1 = -3 (नकारात्मक अनंत की ओर राउंड)। 🎯 Exam Perspective OOP Using C++ ("Operators in C++" sub-topic) से जुड़ा यह सवाल उन students के लिए काम का है जो SSC, Railway, Banking और State PCS की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो। 🔗 Related Questions What is the output: int a=6,b=3; cout What is the output: int a=3,b=4; if(a=0) cout What is the output: int x=5; cout 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Control Statements (133)
32 Question 32 EN + हिं GB What is the output: int a=3,b=4; if(a=0) cout< IN आउटपुट क्या है: int a=3,b=4; if(a=0) cout A 3 3 B 4 4 D Compile error संकलन त्रुटि ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) a=0 assigns 0 to a (evaluates to 0 = false), so else branch executes printing b=4. व्याख्या (हिन्दी) a=0, a को 0 निर्दिष्ट करता है (0 = गलत का मूल्यांकन करता है), इसलिए अन्यथा शाखा b=4 मुद्रण निष्पादित करती है। 🎯 Exam Perspective SSC CGL, IBPS, RRB और State-level परीक्षाओं जैसी परीक्षाओं में OOP Using C++ ("Operators in C++" sub-topic) से सवाल अक्सर पूछे जाते हैं। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें। 🔗 Related Questions What is the output: int x=8; while(x&(x-1)) x&=x-1; cou... What is the output: int x=0xFF; cout What is 'safe bool idiom'? 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Control Statements (133)
33 Question 33 EN + हिं GB What is the output: int x=5; cout<<(x&1?'O':'E'); IN आउटपुट क्या है: int x=5; अदालत A O हे B E ई C Compile error संकलन त्रुटि D Undefined अपरिभाषित ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) 5&1=1: odd. Output: O. व्याख्या (हिन्दी) 5&1=1: विषम। आउटपुट: ओ. 🎯 Exam Perspective अगर आप SSC CGL, IBPS, RRB और State-level परीक्षाओं की तैयारी कर रहे हैं, तो OOP Using C++ ("Operators in C++" sub-topic) का यह topic आपके लिए महत्वपूर्ण है। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें। 🔗 Related Questions What is the output: int a=6,b=3; cout What is the output: int x=8; while(x&(x-1)) x&=x-1; cou... What is the output: int x=5; cout 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Control Statements (133)
34 Question 34 EN + हिं GB What is the output: int x=12; cout<<(x&(x-1)); IN आउटपुट क्या है: int x=12; अदालत A 8 8 B 12 12 C 4 4 D Compile error संकलन त्रुटि ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) 12=1100, 11=1011. AND=1000=8. Output: 8. व्याख्या (हिन्दी) 12=1100, 11=1011. तथा=1000=8. आउटपुट: 8. 🎯 Exam Perspective OOP Using C++ ("Operators in C++" sub-topic) के इस प्रश्न को कई प्रतियोगी परीक्षाओं जैसे UPSC, SSC, Banking और Police भर्ती में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें। 🔗 Related Questions What is the output: int x=8; while(x&(x-1)) x&=x-1; cou... What is the output: int x = -5; cout > 1); What is 'safe bool idiom'? 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Control Statements (133)
35 Question 35 EN + हिं GB What is the output: cout<<(true?1:2.0); IN आउटपुट क्या है: cout A 1 1 B 1.0 1.0 C Compile error संकलन त्रुटि D Undefined अपरिभाषित ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) Common type is double. Returns 1.0. Output: 1. व्याख्या (हिन्दी) सामान्य प्रकार डबल है। रिटर्न 1.0. आउटपुट: 1. 🎯 Exam Perspective यह सवाल OOP Using C++ ("Operators in 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 'conditional assignment' idiom? What is the output: int x=5; auto r=x>3?++x: (1, 6, 73,... 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Control Statements (133)
36 Question 36 EN + हिं GB What is the output: int x=5; cout<<(!x)<<(!!x)<<(!!!x); IN आउटपुट क्या है: int x=5; अदालत A 010 010 B 101 101 C 001 001 D Compile error संकलन त्रुटि ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) !5=0, !!5=1, !!!5=0. Output: 010. व्याख्या (हिन्दी) !5=0, !!5=1, !!!5=0. आउटपुट: 010. 🎯 Exam Perspective यह प्रश्न OOP Using C++ ("Operators in C++" sub-topic) की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है। इस तरह के प्रश्न अक्सर SSC, Railway, Banking और State PCS जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें। 🔗 Related Questions What is the output: int x = -5; cout > 1); What is the output: int a=3,b=4; if(a=0) cout What is the output: int a=6,b=3; cout 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Control Statements (133)
37 Question 37 EN + हिं GB What is the output: int a=6,b=3; cout<<(a/=b,a*=b,a); IN आउटपुट क्या है: int a=6,b=3; अदालत A 6 6 B 2 2 C Compile error संकलन त्रुटि D Undefined अपरिभाषित ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) a/=3=2, a*=3=6, return a=6. Output: 6. व्याख्या (हिन्दी) a/=3=2, a*=3=6, वापसी a=6। आउटपुट: 6. 🎯 Exam Perspective OOP Using C++ ("Operators in C++" sub-topic) से जुड़ा यह सवाल उन students के लिए काम का है जो SSC CGL, IBPS, RRB और State-level परीक्षाओं की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो। 🔗 Related Questions What is the output: int x=5; cout What is the output: int x=0xFF; cout What is the output: int x=0; cout 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Control Statements (133)
38 Question 38 EN + हिं GB What is 'conditional assignment' idiom? IN 'सशर्त असाइनमेंट' मुहावरा क्या है? A x = cond ? a : b; assign based on condition एक्स = शर्त? ए : बी; शर्त के आधार पर असाइन करें B Same as if-else यदि-अन्यथा के समान C Short-circuit assignment शॉर्ट-सर्किट असाइनमेंट D Macro pattern मैक्रो पैटर्न ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) Ternary for assignment: x=(n>0)?n:0 is concise conditional assignment. व्याख्या (हिन्दी) असाइनमेंट के लिए टर्नरी: x=(n>0)?n:0 संक्षिप्त सशर्त असाइनमेंट है। 🎯 Exam Perspective UPSC, SSC, Banking और Police भर्ती जैसी परीक्षाओं में OOP Using C++ ("Operators in C++" sub-topic) से सवाल अक्सर पूछे जाते हैं। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें। 🔗 Related Questions What is the output: int x=12; cout What is the output: cout What is the output: int x = -5; cout > 1); 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Control Statements (133)
39 Question 39 EN + हिं GB What is the output: int x=0xFF; cout<<(x^=0x0F); IN आउटपुट क्या है: int x=0xFF; अदालत A 240 240 B 255 255 C 15 15 D Compile error संकलन त्रुटि ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) 0xFF^0x0F=0xF0=240. Output: 240. व्याख्या (हिन्दी) 0xFF^0x0F=0xF0=240. आउटपुट: 240. 🎯 Exam Perspective अगर आप Railway, SSC, Banking और Defence परीक्षाओं की तैयारी कर रहे हैं, तो OOP Using C++ ("Operators in C++" sub-topic) का यह topic आपके लिए महत्वपूर्ण है। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें। 🔗 Related Questions What is the output: int x=0; cout What is the output: int x=5; cout What is the output: int x=8; while(x&(x-1)) x&=x-1; cou... 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Control Statements (133)
40 Question 40 EN + हिं GB What is the output: int x=5; cout<<(x<<0); IN आउटपुट क्या है: int x=5; अदालत A 5 5 C 1 1 D Compile error संकलन त्रुटि ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) Shift by 0 = no change. Output: 5. व्याख्या (हिन्दी) 0 से शिफ्ट = कोई परिवर्तन नहीं। आउटपुट: 5. 🎯 Exam Perspective OOP Using C++ ("Operators in C++" sub-topic) के इस प्रश्न को कई प्रतियोगी परीक्षाओं जैसे SSC, Railway, Banking और State PCS में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें। 🔗 Related Questions What is the output: int x = -5; cout > 1); What is the output: int x=8; while(x&(x-1)) x&=x-1; cou... What is 'safe bool idiom'? 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Control Statements (133)
41 Question 41 EN + हिं GB What is the output: int x=5; cout<<(x>3&&x<10); IN आउटपुट क्या है: int x=5; अदालत A 1 1 C Compile error संकलन त्रुटि D Undefined अपरिभाषित ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) 5>3=true, 5<10=true. true&&true=1. Output: 1. व्याख्या (हिन्दी) 5>3=सत्य, 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 जरूर पढ़ें। 🔗 Related Questions What is the output: int x=5; cout What is the output: int x=8; while(x&(x-1)) x&=x-1; cou... What is the output: int x = -5; cout > 1); 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Control Statements (133)
42 Question 42 EN + हिं GB What is 'safe bool idiom'? IN 'सुरक्षित बूल मुहावरा' क्या है? A Explicit operator bool to prevent implicit numeric conversions अंतर्निहित संख्यात्मक रूपांतरणों को रोकने के लिए स्पष्ट ऑपरेटर बूल B A macro एक मैक्रो C A template एक टेम्पलेट D A design pattern एक डिज़ाइन पैटर्न ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) explicit operator bool() on smart pointers prevents accidental arithmetic like ptr+1. व्याख्या (हिन्दी) स्मार्ट पॉइंटर्स पर स्पष्ट ऑपरेटर बूल() पीटीआर+1 जैसे आकस्मिक अंकगणित को रोकता है। 🎯 Exam Perspective यह प्रश्न OOP Using C++ ("Operators in C++" sub-topic) की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है। इस तरह के प्रश्न अक्सर UPSC, SSC, Banking और Police भर्ती जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें। 🔗 Related Questions What is the output: int x=5; cout What is the output: int x=5; cout What is the output: int x=5; cout 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Control Statements (133)
43 Question 43 EN + हिं GB What is the output: int x=5; auto r=x>3?++x: (1, 6, 73, 3, 4, 'What is the output: int x=8; while(x&(x-1)) x&=x-1; cout< IN आउटपुट क्या है: int x=5; ऑटो r=x>3?++x: (1, 6, 73, 3, 4, 'आउटपुट क्या है: int x=8; while(x&(x-1)) x&=x-1; cout A 2026-05-25 2026-05-25 ✅ Correct Answer: 🎯 Exam Perspective OOP Using C++ ("Operators in C++" sub-topic) से जुड़ा यह सवाल उन students के लिए काम का है जो Railway, SSC, Banking और Defence परीक्षाओं की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो। 🔗 Related Questions What is the output: int a=6,b=3; cout What is the output: int x = -5; cout > 1); What is the output: int x=5; cout 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Control Statements (133)
44 Question 44 EN + हिं GB What is the output: int x=8; while(x&(x-1)) x&=x-1; cout< IN आउटपुट क्या है: int x=8; जबकि(x&(x-1)) x&=x-1; अदालत A 8 8 B 4 4 C 1 1 D Compile error संकलन त्रुटि ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) 8=1000 is already power of 2. 8&7=0: loop doesn't execute. Output: 8. व्याख्या (हिन्दी) 8=1000 पहले से ही 2 की शक्ति है। 8&7=0: लूप निष्पादित नहीं होता है। आउटपुट: 8. 🎯 Exam Perspective SSC, Railway, Banking और State PCS जैसी परीक्षाओं में OOP Using C++ ("Operators in C++" sub-topic) से सवाल अक्सर पूछे जाते हैं। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें। 🔗 Related Questions What is the output: int x=5; cout What is the output: cout What is 'safe bool idiom'? 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Control Statements (133)
45 Question 45 EN + हिं GB What is the output: int x=0; cout<<(x=5,x*x); IN आउटपुट क्या है: int x=0; अदालत A 25 25 B 5 5 D Compile error संकलन त्रुटि ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) Evaluates x=5, then x*x=25. Output: 25. व्याख्या (हिन्दी) x=5 का मूल्यांकन करता है, फिर x*x=25. आउटपुट: 25. 🎯 Exam Perspective अगर आप SSC CGL, IBPS, RRB और State-level परीक्षाओं की तैयारी कर रहे हैं, तो OOP Using C++ ("Operators in C++" sub-topic) का यह topic आपके लिए महत्वपूर्ण है। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें। 🔗 Related Questions What is the output: int x=5; cout What is the output: int x=5; cout What is 'conditional assignment' idiom? 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Control Statements (133)