76
GB
What is the output: class A{public:int x; A(int v):x(v){cout<<'C';} ~A(){cout<<'D';} A(A&&o):x(o.x){o.x=0;cout<<'M';}}; A f(){return A(5);} A a=f(); cout<
IN
आउटपुट क्या है: class A{public:int x; A(int v):x(v){cout
A
C5
सी 5
B
CM5
सीएम5
C
CCD5
सीसीडी5
D
Compile error
संकलन त्रुटि
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English)
C++17 mandatory elision: only one C, no move. a.x=5. Output: C5D (D at scope end, but question asks output before scope end: C5).
व्याख्या (हिन्दी)
C++17 अनिवार्य एलिशन: केवल एक C, कोई चाल नहीं। a.x=5. आउटपुट: C5D (D स्कोप अंत में है, लेकिन प्रश्न स्कोप अंत से पहले आउटपुट पूछता है: C5)।