406
GB
What is the output: struct A{~A(){cout<<'D';}}; try{A a; throw 1;}catch(int){cout<<'C';}
IN
आउटपुट क्या है: struct A{~A(){cout
A
CD
सीडी
B
DC
डीसी
C
C
सी
D
Compile error
संकलन त्रुटि
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English)
Stack unwinding destroys a (prints D) before catch handler executes (prints C). Output: DC.
व्याख्या (हिन्दी)
कैच हैंडलर निष्पादित (प्रिंट सी) से पहले स्टैक अनवाइंडिंग (प्रिंट डी) को नष्ट कर देता है। आउटपुट: डीसी.