OOP Using C++ — MCQ Practice

Hindi aur English dono mein practice karo — click karo answer check karne ke liye.

📚 107 Questions 🌐 Hindi + English ✅ Free
भाषा / Language:
107 questions

Question 106

EN + हिं

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
AAZZE अज्जे
AAZZZE AAZZZE
Compile error संकलन त्रुटि
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 जरूर पढ़ें।