106 Question 106 EN + हिं GB What is the output: class A{public:int x; A(int v):x(v){} auto operator+(const A& o)const{return A{x+o.x};}}; vectorv={{1},{2},{3},{4},{5}}; cout< IN आउटपुट क्या है: class A{public:int x; A(int v):x(v){} ऑटो ऑपरेटर+(const A& o)const{return A{x+o.x};}}; वेक्टरv={{1},{2},{3},{4},{5}}; अदालत A 15 15 B 5 5 C Compile error संकलन त्रुटि D Undefined अपरिभाषित ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) Sum x values: 15. Output: 15. व्याख्या (हिन्दी) योग x मान: 15. आउटपुट: 15. 🎯 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:int x; A(int v):x(v)... 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)
107 Question 107 EN + हिं GB What is the output: class A{public:int x; A(int v):x(v){cout<<'A';} ~A(){cout<<'Z';}}; try{A a(1); A b(2); throw 1;}catch(int){cout<<'E';} IN आउटपुट क्या है: class A{public:int x; A(int v):x(v){cout A AAZZE अज्जे B AAZZZE AAZZZE C Compile error संकलन त्रुटि D Undefined अपरिभाषित ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) A(1)=A; A(2)=A; throw: ~b=Z,~a=Z; catch: E. Output: AAZZE. व्याख्या (हिन्दी) ए(1)=ए; ए(2)=ए; फेंकें: ~बी=जेड,~ए=जेड; कैच: ई. आउटपुट: AAZZE. 🎯 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; A(int v):x(v)... 📚 Related Topic Introduction to C++ (187) Variables and Data Types (160) Operators in C++ (163)