76
GB
What is the output: class A{public:virtual int calc(int x)const=0;}; class SqA:public A{public:int calc(int x)const override{return x*x;}}; class CuA:public A{public:int calc(int x)const override{return x*x*x;}}; auto eval=[](const A& a,int x){return a.calc(x);}; SqA sq; CuA cu; cout<
IN
आउटपुट क्या है: class A{public:virtual int calc(int x)const=0;}; वर्ग SqA:सार्वजनिक A{सार्वजनिक:int calc(int x)const ओवरराइड{रिटर्न x*x;}}; वर्ग CuA: सार्वजनिक A {सार्वजनिक: int calc (int x) स्थिरांक ओवरराइड {वापसी x*x*x;}}; ऑटो eval=[](const A& a,int x){return a.calc(x);}; वर्गA वर्ग; CuA cu; अदालत
A
927
927
B
Compile error
संकलन त्रुटि
C
Undefined
अपरिभाषित
D
9 27
9 27
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English)
sq(3)=9; cu(3)=27. Output: 927.
व्याख्या (हिन्दी)
वर्ग(3)=9; घन(3)=27. आउटपुट: 927.