346
GB
What is the output: class A{int x=5; public: void f(){x*=2;} int g()const{return x;}}; A a; a.f(); a.f(); cout<
IN
आउटपुट क्या है: class A{int x=5; सार्वजनिक: void f(){x*=2;} int g()const{return x;}}; ए ए; a.f(); a.f(); अदालत
A
20
20
B
10
10
C
5
5
D
40
40
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English)
Initial x=5. f() doubles: 5->10->20. g()=20. Output: 20.
व्याख्या (हिन्दी)
प्रारंभिक x=5. f() दोगुना: 5->10->20। जी()=20. आउटपुट: 20.