91 Question 91 EN + हिं GB What is the output: class A{public:vectorv; A(initializer_listil):v(il){}}; A a={1,2,3,4,5}; cout< IN आउटपुट क्या है: class A{public:vectorv; ए(इनिशियलाइज़र_लिस्टिल):v(il){}}; ए ए={1,2,3,4,5}; अदालत A 53 53 B 51 51 C Compile error संकलन त्रुटि D Undefined अपरिभाषित ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) size=5, v[2]=3. Output: 53. व्याख्या (हिन्दी) आकार=5, वी[2]=3. आउटपुट: 53. 🎯 Exam Perspective OOP Using C++ ("Constructors and Destructors" sub-topic) से जुड़ा यह सवाल उन students के लिए काम का है जो UPSC, SSC, Banking और Police भर्ती की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो। 🔗 Related Questions What is the output: class A{int x; public:explicit A(in... What is the output: class A{public:int x; A(int v):x(v)... What is the output: class A{public:int x,y; A(int a,int... 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
92 Question 92 EN + हिं GB What is the output: class A{int x; public:A(int v):x(v){} friend bool operator<(const A& a,const A& b){return a.x IN आउटपुट क्या है: class A{int x; सार्वजनिक:ए(int v):x(v){} मित्र बूल ऑपरेटर A 14 14 B 34 34 C Compile error संकलन त्रुटि D Undefined अपरिभाषित ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) Sorted: 1,2,3,4. arr[0].x=1,arr[3].x=4. Output: 14. व्याख्या (हिन्दी) क्रमबद्ध: 1,2,3,4. गिरफ्तारी[0].x=1, गिरफ्तारी[3].x=4. आउटपुट: 14. 🎯 Exam Perspective Railway, SSC, Banking और Defence परीक्षाओं जैसी परीक्षाओं में OOP Using C++ ("Constructors and Destructors" sub-topic) से सवाल अक्सर पूछे जाते हैं। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें। 🔗 Related Questions What is the output: class A{public:int x; A(int v):x(v)... What is the output: class A{public:int x; A(int v):x(v)... What is the output: class A{public:int x; explicit A(in... 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
93 Question 93 EN + हिं GB What is the output: class A{public:int x; explicit A(int v):x(v){}}; A a=A(5); cout< IN आउटपुट क्या है: class A{public:int x; स्पष्ट A(int v):x(v){}}; ए ए=ए(5); अदालत A 5 5 B Compile error संकलन त्रुटि C Undefined अपरिभाषित ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) A(5) explicitly. a.x=5. Output: 5. व्याख्या (हिन्दी) ए(5) स्पष्ट रूप से। a.x=5. आउटपुट: 5. 🎯 Exam Perspective अगर आप SSC, Railway, Banking और State PCS की तैयारी कर रहे हैं, तो OOP Using C++ ("Constructors and Destructors" sub-topic) का यह topic आपके लिए महत्वपूर्ण है। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें। 🔗 Related Questions What is the output: class A{public:int x=42; A()=defaul... What is the output: class A{public:int x=1; A()=default... What is the output: class A{public:int x,y; A(int a,int... 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
94 Question 94 EN + हिं GB What is the output: class A{public:int x=42; A()=default;}; A a{}; cout< IN आउटपुट क्या है: class A{public:int x=42; ए()=डिफ़ॉल्ट;}; ए ए{}; अदालत A 42 42 C Compile error संकलन त्रुटि D Undefined अपरिभाषित ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) Default ctor uses in-class init x=42. Output: 42. व्याख्या (हिन्दी) डिफ़ॉल्ट ctor इन-क्लास init x=42 का उपयोग करता है। आउटपुट: 42. 🎯 Exam Perspective OOP Using C++ ("Constructors and Destructors" sub-topic) के इस प्रश्न को कई प्रतियोगी परीक्षाओं जैसे SSC CGL, IBPS, RRB और State-level परीक्षाओं में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें। 🔗 Related Questions What is the output: class Base{public:Base(){cout What is the output: class A{public:int x=1; A()=default... What is the output: class A{public:int x; A(int v):x(v)... 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
95 Question 95 EN + हिं GB What is the output: class A{public:int x,y; A(int a,int b):y(b),x(a+y){}}; A a(1,2); cout< IN आउटपुट क्या है: class A{public:int x,y; A(int a,int b):y(b),x(a+y){}}; ए ए(1,2); अदालत A Undefined behavior अपरिभाषित व्यवहार B 32 32 C 12 12 D Compile error संकलन त्रुटि ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) Members init in declaration order: x first, then y. x=a+y where y is uninitialized = UB. व्याख्या (हिन्दी) सदस्य घोषणा क्रम में आरंभ करते हैं: पहले x, फिर y। x=a+y जहां y आरंभीकृत नहीं है = UB. 🎯 Exam Perspective यह सवाल OOP Using C++ ("Constructors and Destructors" sub-topic) category का है, और UPSC, SSC, Banking और Police भर्ती के exam pattern में इस तरह के questions common हैं। Answer choose करने के बाद दिया गया explanation जरूर पढ़ें। 🔗 Related Questions What is the output: class A{public:int x=1; A()=default... What is the output: class A{public:int x; explicit A(in... What is the output: class A{public:int x=0; A& inc(int... 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
96 Question 96 EN + हिं GB What is the output: class A{public:int x; A(int v):x(v){} auto clone(){return A(x);}}; A a(5); auto b=a.clone(); b.x=10; cout< IN आउटपुट क्या है: class A{public:int x; A(int v):x(v){} ऑटो क्लोन(){रिटर्न A(x);}}; ए ए(5); ऑटो b=a.clone(); b.x=10; अदालत A 510 510 B 1010 1010 C Compile error संकलन त्रुटि D Undefined अपरिभाषित ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) b is new A(5). b.x=10. a.x=5. Output: 510. व्याख्या (हिन्दी) b नया A(5) है। बी.एक्स=10. a.x=5. आउटपुट: 510. 🎯 Exam Perspective यह प्रश्न OOP Using C++ ("Constructors and Destructors" sub-topic) की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है। इस तरह के प्रश्न अक्सर Railway, SSC, Banking और Defence परीक्षाओं जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें। 🔗 Related Questions What is the output: class Base{public:Base(){cout What is the output: class A{public:int x; A(int v):x(v)... What is the output: class A{public:int x; A(int v=0):x(... 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
97 Question 97 EN + हिं GB What is the output: class A{public:int x; A(int v):x(v){cout< IN आउटपुट क्या है: class A{public:int x; A(int v):x(v){cout A 3-4 3-4 B 33 33 C Compile error संकलन त्रुटि D Undefined अपरिभाषित ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) ctor prints 3; dtor prints ~3=-4. Output: 3-4. व्याख्या (हिन्दी) ctor प्रिंट्स 3; डीटीओआर ~3=-4 प्रिंट करता है। आउटपुट: 3-4. 🎯 Exam Perspective OOP Using C++ ("Constructors and Destructors" sub-topic) से जुड़ा यह सवाल उन students के लिए काम का है जो SSC, Railway, Banking और State PCS की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो। 🔗 Related Questions What is the output: class A{public:int x; A(int v):x(v)... What is the output: class Base{public:Base(){cout What is the output: class A{int x; public:explicit A(in... 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
98 Question 98 EN + हिं GB What is the output: class A{public:int x=1; A()=default; A(const A&o):x(o.x+1){}}; A a,b(a),c(b); cout< IN आउटपुट क्या है: class A{public:int x=1; ए()=डिफ़ॉल्ट; A(const A&o):x(o.x+1){}}; ए ए,बी(ए),सी(बी); अदालत A 123 123 B 111 111 C Compile error संकलन त्रुटि D Undefined अपरिभाषित ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) a.x=1; b.x=1+1=2; c.x=2+1=3. Output: 123. व्याख्या (हिन्दी) a.x=1; b.x=1+1=2; c.x=2+1=3. आउटपुट: 123. 🎯 Exam Perspective SSC CGL, IBPS, RRB और State-level परीक्षाओं जैसी परीक्षाओं में OOP Using C++ ("Constructors and Destructors" sub-topic) से सवाल अक्सर पूछे जाते हैं। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें। 🔗 Related Questions What is the output: class A{public:int x; A(int v):x(v)... What is the output: struct POD{int x,y,z;}; POD a={1,2,... What is the output: class A{public:int x=42; A()=defaul... 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
99 Question 99 EN + हिं GB What is the output: class A{int x; public:explicit A(int v):x(v){} explicit A(double v):x((int)v){} int get()const{return x;}}; A a(3.7); cout< IN आउटपुट क्या है: class A{int x; सार्वजनिक:स्पष्ट A(int v):x(v){} स्पष्ट A(डबल v):x((int)v){} int get()const{return x;}}; ए ए(3.7); अदालत A 3 3 B 4 4 C Compile error संकलन त्रुटि D Undefined अपरिभाषित ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) (int)3.7=3. Output: 3. व्याख्या (हिन्दी) (int)3.7=3. आउटपुट: 3. 🎯 Exam Perspective अगर आप UPSC, SSC, Banking और Police भर्ती की तैयारी कर रहे हैं, तो OOP Using C++ ("Constructors and Destructors" sub-topic) का यह topic आपके लिए महत्वपूर्ण है। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें। 🔗 Related Questions What is the output: class A{int x; public:A(int v):x(v)... What is the output: class A{public:int x,y; A(int a,int... What is the output: class A{public:int x=1; A()=default... 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
100 Question 100 EN + हिं GB What is the output: class Base{public:Base(){cout<<'B';} ~Base(){cout<<'b';}}; class Der:public Base{public:Der(){cout<<'D';} ~Der(){cout<<'d';}}; Der d; IN आउटपुट क्या है: क्लास बेस {पब्लिक: बेस() {काउट A BDdb बीडीडीबी B BdDb बीडीडीबी C Compile error संकलन त्रुटि D Undefined अपरिभाषित ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) B,D,~d,~b. Output: BDdb. व्याख्या (हिन्दी) बी,डी,~डी,~बी. आउटपुट: बीडीडीबी. 🎯 Exam Perspective OOP Using C++ ("Constructors and Destructors" sub-topic) के इस प्रश्न को कई प्रतियोगी परीक्षाओं जैसे Railway, SSC, Banking और Defence परीक्षाओं में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें। 🔗 Related Questions What is the output: class A{public:int x; A(int v):x(v)... What is the output: class A{public:vectorv; A(initializ... What is the output: struct POD{int x,y,z;}; POD a={1,2,... 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
101 Question 101 EN + हिं GB What is the output: class A{public:int x; A(int v=0):x(v){} A(const A&)=default; A(A&&o)noexcept:x(move(o.x)){o.x=-1;}}; A a(5); A b(move(a)); cout< IN आउटपुट क्या है: class A{public:int x; A(int v=0):x(v){} A(const A&)=default; A(A&&o)noexcept:x(move(o.x)){o.x=-1;}}; ए ए(5); ए बी(चाल(ए)); अदालत A -15 -15 B 55 55 C Compile error संकलन त्रुटि D Undefined अपरिभाषित ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) b.x=5; a.x=-1. Output: -15. व्याख्या (हिन्दी) बी.एक्स=5; a.x=-1. आउटपुट:-15. 🎯 Exam Perspective यह सवाल OOP Using C++ ("Constructors and Destructors" sub-topic) category का है, और SSC, Railway, Banking और State PCS के exam pattern में इस तरह के questions common हैं। Answer choose करने के बाद दिया गया explanation जरूर पढ़ें। 🔗 Related Questions What is the output: class A{public:int x; A(int v):x(v)... What is the output: class A{public:int x=42; A()=defaul... What is the output: class A{public:int x,y; A(int a,int... 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
102 Question 102 EN + हिं GB What is the output: class A{public:int x; A(int v):x(v){} A(const A& o):x(o.x){}}; A f(A a){a.x*=2; return a;} A a(5); A b=f(a); cout< IN आउटपुट क्या है: class A{public:int x; A(int v):x(v){} A(const A& o):x(o.x){}}; A f(A a){a.x*=2; वापसी ए;} ए ए(5); ए बी=एफ(ए); अदालत A 510 510 B 1010 1010 C Compile error संकलन त्रुटि D Undefined अपरिभाषित ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) a passed by value; f doubles copy; returned copy b.x=10. a.x=5. Output: 510. व्याख्या (हिन्दी) एक पारित मूल्य; एफ डबल्स कॉपी; लौटाई गई प्रति b.x=10. a.x=5. आउटपुट: 510. 🎯 Exam Perspective यह प्रश्न OOP Using C++ ("Constructors and Destructors" sub-topic) की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है। इस तरह के प्रश्न अक्सर SSC CGL, IBPS, RRB और State-level परीक्षाओं जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें। 🔗 Related Questions What is the output: class A{public:int x=42; A()=defaul... What is the output: class A{public:int x; A(int v=0):x(... What is the output: class A{int x; public:explicit A(in... 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
103 Question 103 EN + हिं GB What is the output: class A{public:int x; A(int v):x(v){} void print()const{cout<print(); delete p; IN आउटपुट क्या है: class A{public:int x; A(int v):x(v){} void print()const{cout A 42 42 C Compile error संकलन त्रुटि D Undefined अपरिभाषित ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) p->print()=42. Output: 42. व्याख्या (हिन्दी) p->प्रिंट()=42. आउटपुट: 42. 🎯 Exam Perspective OOP Using C++ ("Constructors and Destructors" sub-topic) से जुड़ा यह सवाल उन students के लिए काम का है जो UPSC, SSC, Banking और Police भर्ती की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो। 🔗 Related Questions What is the output: class A{public:int x; A(int v):x(v)... What is the output: class A{public:int x; A(int v=0):x(... What is the output: class A{public:int x; A(int v):x(v)... 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
104 Question 104 EN + हिं GB What is the output: struct POD{int x,y,z;}; POD a={1,2,3}; POD b=a; b.x=10; cout< IN आउटपुट क्या है: struct POD{int x,y,z;}; पीओडी ए={1,2,3}; पीओडी बी=ए; b.x=10; अदालत A 110 110 B 1010 1010 C Compile error संकलन त्रुटि D Undefined अपरिभाषित ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) b is copy; b.x=10 doesn't affect a. Output: 110. व्याख्या (हिन्दी) बी प्रतिलिपि है; b.x=10 a को प्रभावित नहीं करता है। आउटपुट: 110. 🎯 Exam Perspective Railway, SSC, Banking और Defence परीक्षाओं जैसी परीक्षाओं में OOP Using C++ ("Constructors and Destructors" sub-topic) से सवाल अक्सर पूछे जाते हैं। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें। 🔗 Related Questions What is the output: class A{public:int x; A(int v):x(v)... What is the output: class A{public:int x; A(int v=0):x(... What is the output: class A{public:int x=42; A()=defaul... 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
105 Question 105 EN + हिं GB What is the output: class A{public:int x=0; A& inc(int n=1){x+=n;return *this;} A& dec(int n=1){x-=n;return *this;}}; A a; a.inc().inc(5).dec(2); cout< IN आउटपुट क्या है: class A{public:int x=0; A& inc(int n=1){x+=n;return *this;} A& dec(int n=1){x-=n;return *this;}}; ए ए; a.inc().inc(5).dec(2); अदालत A 4 4 B 6 6 C Compile error संकलन त्रुटि D Undefined अपरिभाषित ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) 0+1+5-2=4. Output: 4. व्याख्या (हिन्दी) 0+1+5-2=4. आउटपुट: 4. 🎯 Exam Perspective अगर आप SSC, Railway, Banking और State PCS की तैयारी कर रहे हैं, तो OOP Using C++ ("Constructors and Destructors" sub-topic) का यह topic आपके लिए महत्वपूर्ण है। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें। 🔗 Related Questions What is the output: class A{int x; public:explicit A(in... What is the output: class A{int x; public:A(int v):x(v)... What is the output: class A{public:int x,y; A(int a,int... 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)