1366
GB
What is the output: class A{int x; public: void setX(int v){x=v;} int getX()const{return x;} A(int v=0):x(v){}}; vector v(3); v[1].setX(5); cout<
IN
आउटपुट क्या है: class A{int x; सार्वजनिक: void setX(int v){x=v;} int getX()const{return x;} A(int v=0):x(v){}}; वेक्टर वी(3); v[1].setX(5); अदालत
A
5
5
C
Compile error
संकलन त्रुटि
D
Undefined
अपरिभाषित
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English)
v[1].x=5. getX()=5. Output: 5.
व्याख्या (हिन्दी)
v[1].x=5. गेटएक्स()=5. आउटपुट: 5.