1726
GB
What is the output: class A{public:int x; A(int v):x(v){} A(const A& o):x(o.x){}}; A f(A a){a.x*=2; return a;} A a(5); A b=f(a); cout<
IN
आउटपुट क्या है: class A{public:int x; A(int v):x(v){} A(const A& o):x(o.x){}}; A f(A a){a.x*=2; वापसी ए;} ए ए(5); ए बी=एफ(ए); अदालत
A
510
510
B
1010
1010
C
Compile error
संकलन त्रुटि
D
Undefined
अपरिभाषित
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English)
a passed by value; f doubles copy; returned copy b.x=10. a.x=5. Output: 510.
व्याख्या (हिन्दी)
एक पारित मूल्य; एफ डबल्स कॉपी; लौटाई गई प्रति b.x=10. a.x=5. आउटपुट: 510.