46 Question 46 EN + हिं GB What is the output: class A{public:int x=1,y=2; A(int v):y(v),x(y){}}; A a(5); cout< IN आउटपुट क्या है: class A{public:int x=1,y=2; A(int v):y(v),x(y){}}; ए ए(5); अदालत A 25 25 B 15 15 C Compile error संकलन त्रुटि D Undefined अपरिभाषित ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) x initialized first (declaration order): x=y is UB — y not yet initialized. Undefined. व्याख्या (हिन्दी) x को पहले प्रारंभ किया गया (घोषणा क्रम): x=y यूबी है - y को अभी तक प्रारंभ नहीं किया गया है। अपरिभाषित. 🎯 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:~A()=default; A()=de... What is the output: class A{public:A(){cout What is the output: class A{public:A(){cout 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
47 Question 47 EN + हिं GB What is the output: class A{public:int x; A(int v):x(v){cout<<'C';} ~A(){cout<<'D';}}; auto p=make_unique(5); cout<x; IN आउटपुट क्या है: class A{public:int x; A(int v):x(v){cout A C5D C5D B 5 5 C Compile error संकलन त्रुटि D Undefined अपरिभाषित ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) A(5) ctor prints C; p->x=5; at end unique_ptr destroys: D. Output: C5D. व्याख्या (हिन्दी) A(5) ctor C प्रिंट करता है; p->x=5; अंत मेंunique_ptr नष्ट कर देता है: D. आउटपुट: C5D। 🎯 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 'deleted special member'? What is the output: class A{public:~A()=default; A()=de... What is the output: class A{static int n; public: A(){n... 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
48 Question 48 EN + हिं GB What is the output: class A{public:A(){cout<<'A';}}; class B{public:B(){cout<<'B';}}; class C:public A{B b; public:C(){cout<<'C';}}; C c; IN आउटपुट क्या है: क्लास ए {पब्लिक: ए() {काउट A ABC एबीसी B CBA सीबीए C Compile error संकलन त्रुटि D Undefined अपरिभाषित ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) A() base first, B() member next, C() body last. Output: ABC. व्याख्या (हिन्दी) A() आधार पहले, B() सदस्य अगला, C() निकाय अंतिम। आउटपुट: एबीसी. 🎯 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{static int n; public: A(){n... What is the output: class A{public:int x=0; A(){} A(A&&... What is the output: class A{public:int x=1,y=2; A(int v... 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
49 Question 49 EN + हिं GB What is the output: class A{public:int x; A(int v):x(v){} A(const A& o):x(o.x+10){}}; A a(5); A b(a); cout< IN आउटपुट क्या है: class A{public:int x; A(int v):x(v){} A(const A& o):x(o.x+10){}}; ए ए(5); ए बी(ए); अदालत A 515 515 B 510 510 C Compile error संकलन त्रुटि D Undefined अपरिभाषित ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) a.x=5; b.x=a.x+10=15. Output: 515. व्याख्या (हिन्दी) a.x=5; b.x=a.x+10=15. आउटपुट: 515. 🎯 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:~A()=default; A()=de... What is the output: class A{public:int x; A(int v):x(v)... What is 'deleted special member'? 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
50 Question 50 EN + हिं GB What is the output: class A{public:int x=0; A(){} A(A&&o):x(o.x){o.x=-1;}}; A a; a.x=5; A b=move(a); cout< IN आउटपुट क्या है: class A{public:int x=0; A(){} A(A&&o):x(o.x){o.x=-1;}}; ए ए; a.x=5; ए बी = चाल (ए); अदालत A -15 -15 B 5-1 5-1 C Compile error संकलन त्रुटि D Undefined अपरिभाषित ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) -1 then 5. Output: -15. व्याख्या (हिन्दी) -1 फिर 5. आउटपुट: -15. 🎯 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(initializer... What is the output: class A{public:int x=1,y=2; A(int v... 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)
51 Question 51 EN + हिं GB What is the output: class A{static int n; public: A(){n++;} ~A(){n (1, 6, 79, 9, 4, 'What is the output: class A{public:int* p; A():p(new int(5)){} A(const A& o):p(new int(*o.p)){} ~A(){delete p;}}; A a; A b=a; *b.p=10; cout<<*a.p<<*b.p;', 'Deep copy ctor?', '510', '510', '1010', '1010', 'Compile error', 'Compile error', 'Undefined', 'Undefined', NULL, 'option_a', 'Deep copy: b gets own int. *b.p=10 doesn't affect *a.p=5. Output: 510. IN आउटपुट क्या है: class A{static int n; सार्वजनिक: A(){n++;} ~A(){n (1, 6, 79, 9, 4, 'आउटपुट क्या है: क्लास ए {सार्वजनिक: int * p; A():p(new int(5)){} A(const A& o):p(new int(*op.p)){} ~A(){delete p;}}; A a; A b=a; *b.p=10; cout A 2026-05-25 2026-05-25 ✅ Correct Answer: 🎯 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=0; A(){} A(A&&... What is 'deleted special member'? What is the output: class A{int x; public: void setX(in... 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
52 Question 52 EN + हिं GB What is the output: class A{public:int* p; A():p(new int(5)){} A(const A& o):p(new int(*o.p)){} ~A(){delete p;}}; A a; A b=a; *b.p=10; cout<<*a.p<<*b.p; IN आउटपुट क्या है: class A{public:int* p; A():p(new int(5)){} A(const A& o):p(new int(*o.p)){} ~A(){delete p;}}; ए ए; ए बी=ए; *बी.पी=10; अदालत A 510 510 B 1010 1010 C Compile error संकलन त्रुटि D Undefined अपरिभाषित ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) Deep copy: b gets own int. *b.p=10 doesn't affect *a.p=5. Output: 510. व्याख्या (हिन्दी) डीप कॉपी: बी को अपना इंट मिलता है। *बी.पी=10 *ए.पी=5 को प्रभावित नहीं करता। आउटपुट: 510. 🎯 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 A{public:~A()=default; A()=de... What is the output: class A{public:int x; A(int v):x(v)... What is the output: class A{public:A(){cout 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
53 Question 53 EN + हिं GB What is the output: class A{public:int x; A(int v):x(v){} A& operator=(const A& o){x=o.x; return *this;}}; A a(3),b(5); a=b; cout< IN आउटपुट क्या है: class A{public:int x; A(int v):x(v){} A& ऑपरेटर=(const A& o){x=o.x; वापसी *यह;}}; ए ए(3),बी(5); ए=बी; अदालत A 5 5 B 3 3 C Compile error संकलन त्रुटि D Undefined अपरिभाषित ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) a.x=b.x=5. Output: 5. व्याख्या (हिन्दी) a.x=b.x=5. आउटपुट: 5. 🎯 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* p; A():p(new in... What is the output: class A{public:int x=1,y=2; A(int v... What is the output: class A{public:int x=0; A(){} A(A&&... 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
54 Question 54 EN + हिं GB What is the output: class A{public:~A()=default; A()=default;}; A a; cout<<'X'; IN आउटपुट क्या है: class A{public:~A()=default; ए()=डिफ़ॉल्ट;}; ए ए; अदालत A X एक्स B Compile error संकलन त्रुटि C Undefined अपरिभाषित D Nothing कुछ नहीं ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) Valid; prints X. Output: X. व्याख्या (हिन्दी) वैध; एक्स प्रिंट करता है। आउटपुट: एक्स। 🎯 Exam Perspective यह प्रश्न OOP Using C++ ("Constructors and Destructors" sub-topic) की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है। इस तरह के प्रश्न अक्सर Railway, SSC, Banking और Defence परीक्षाओं जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें। 🔗 Related Questions What is the output: class A{public:int x=0; A(int v):x(... What is the output: class A{public:A(){cout What is the output: class A{public:int* p; A():p(new in... 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
55 Question 55 EN + हिं GB What is the output: class A{public:A(){cout<<'N';} A(int){cout<<'I';} A(double){cout<<'D';} A(const A&){cout<<'C';}}; A a=5; A b=5.0; A c=a; IN आउटपुट क्या है: क्लास ए {पब्लिक: ए() {काउट A IDC आईडीसी B NIC एनआईसी C Compile error संकलन त्रुटि D Undefined अपरिभाषित ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) a=5: A(int)=I; b=5.0: A(double)=D; c=a: copy=C. Output: IDC. व्याख्या (हिन्दी) a=5: A(int)=I; बी=5.0: ए(डबल)=डी; सी=ए: कॉपी=सी. आउटपुट: आईडीसी. 🎯 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:A(){cout What is the output: class A{public:int x=0; A(int v):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)
56 Question 56 EN + हिं GB What is the output: class A{public:int x; A(initializer_list il):x(*il.begin()){}}; A a={42,1,2}; cout< IN आउटपुट क्या है: class A{public:int x; A(initializer_list il):x(*il.begin()){}}; ए ए={42,1,2}; अदालत A 42 42 B 1 1 C Compile error संकलन त्रुटि D Undefined अपरिभाषित ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) x=*begin(il)=42. Output: 42. व्याख्या (हिन्दी) x=*शुरू(il)=42. आउटपुट: 42. 🎯 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=0; A(){} A(A&&... What is the output: class A{public:int x=1,y=2; A(int v... 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)
57 Question 57 EN + हिं GB What is 'deleted special member'? IN 'हटाए गए विशेष सदस्य' क्या है? A =delete explicitly disables the function =delete फ़ंक्शन को स्पष्ट रूप से अक्षम कर देता है B Makes function private फ़ंक्शन को निजी बनाता है C Pure virtual शुद्ध आभासी D Not callable कॉल करने योग्य नहीं ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) A(const A&)=delete; prevents copy construction; attempting it is a compile error. व्याख्या (हिन्दी) ए(स्थिरांक ए&)=हटाएं; प्रतिलिपि निर्माण को रोकता है; इसका प्रयास करना एक संकलन त्रुटि है। 🎯 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{public:int x; A(initializer... What is the output: class A{public:int x; A(int v):x(v)... What is the output: class A{public:A(){cout 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
58 Question 58 EN + हिं GB What is the output: class A{public:int x; A():x(0){} A(A&&o) noexcept:x(o.x){o.x=0;} A(const A&)=delete;}; A f(){return A();} A a=f(); cout< IN आउटपुट क्या है: class A{public:int x; A():x(0){} A(A&&o) noexcept:x(o.x){o.x=0;} A(const A&)=delete;}; A f(){वापसी A();} A a=f(); अदालत B Compile error संकलन त्रुटि C Undefined अपरिभाषित D 5 5 ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) A() created then moved/elided into a. a.x=0. Output: 0. व्याख्या (हिन्दी) A() बनाया गया और फिर a में स्थानांतरित/एलिंड किया गया। a.x=0. आउटपुट: 0. 🎯 Exam Perspective OOP Using C++ ("Constructors and Destructors" sub-topic) के इस प्रश्न को कई प्रतियोगी परीक्षाओं जैसे Railway, SSC, Banking और Defence परीक्षाओं में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें। 🔗 Related Questions What is 'deleted special member'? What is the output: class A{public:A(){cout 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)
59 Question 59 EN + हिं GB What is the output: class A{public:int x=0; A(int v):x(v){} A& operator+=(const A& o){x+=o.x;return *this;}}; A a(3),b(4); a+=b; cout< IN आउटपुट क्या है: class A{public:int x=0; A(int v):x(v){} A& ऑपरेटर+=(const A& o){x+=o.x;return *this;}}; ए ए(3),बी(4); ए+=बी; अदालत A 7 7 B 3 3 C Compile error संकलन त्रुटि D Undefined अपरिभाषित ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) a.x=3+4=7. Output: 7. व्याख्या (हिन्दी) a.x=3+4=7. आउटपुट: 7. 🎯 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:A(){cout What is the output: class A{public:int x=0; A(){} A(A&&... 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
60 Question 60 EN + हिं GB What is the output: class A{int x; public: void setX(int v){x=v;} int getX()const{return x;} A():x(100){}}; A a; cout< IN आउटपुट क्या है: class A{int x; सार्वजनिक: void setX(int v){x=v;} int getX()const{return x;} A():x(100){}}; ए ए; अदालत A 100200 100200 B 200200 200200 C Compile error संकलन त्रुटि D Undefined अपरिभाषित ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) Initial x=100; after setX(200): x=200. Output: 100200. व्याख्या (हिन्दी) आरंभिक x=100; सेटएक्स(200) के बाद: x=200। आउटपुट: 100200. 🎯 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:A(){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(initializer... 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)