16
GB
What is the output: class A{int x; public: A(int v):x(v){} operator int(){return x;}}; A a(5); cout<
IN
आउटपुट क्या है: class A{int x; सार्वजनिक: A(int v):x(v){} ऑपरेटर int(){return x;}}; ए ए(5); अदालत
A
8
8
B
5
5
C
Compile error
संकलन त्रुटि
D
Undefined
अपरिभाषित
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English)
operator int() converts a to 5. 5+3=8. Output: 8.
व्याख्या (हिन्दी)
ऑपरेटर int() a को 5 में परिवर्तित करता है। 5+3=8। आउटपुट: 8.