106
GB
What is the output: class A{int x; public:A(int v):x(v){} A twice()const{return {x*2};} A inc()const{return {x+1};} int get()const{return x;}}; A a(3); cout<
IN
आउटपुट क्या है: class A{int x; सार्वजनिक:ए(int v):x(v){} A twos()const{return {x*2};} A inc()const{return {x+1};} int get()const{return x;}}; ए ए(3); अदालत
A
14
14
B
12
12
C
Compile error
संकलन त्रुटि
D
Undefined
अपरिभाषित
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English)
3*2=6; 6+1=7; 7*2=14. Output: 14.
व्याख्या (हिन्दी)
3*2=6; 6+1=7; 7*2=14. आउटपुट: 14.