46
GB
What is the output: class A{public:int v; A(int x):v(x){} A operator+(const A& o){return A(v+o.v);}}; A a(3),b(4); cout<<(a+b).v;
IN
आउटपुट क्या है: class A{public:int v; A(int x):v(x){} A ऑपरेटर+(const A& o){return A(v+o.v);}}; ए ए(3),बी(4); अदालत
A
7
7
B
12
12
C
Compile error
संकलन त्रुटि
D
Undefined
अपरिभाषित
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English)
3+4=7. Output: 7.
व्याख्या (हिन्दी)
3+4=7. आउटपुट: 7.