1741
GB
What is the output: class A{public:virtual void f(){cout<<'A';} virtual void g(){f();}}; class B:public A{public:void f()override{cout<<'B';}}; B b; b.g();
IN
आउटपुट क्या है: क्लास ए {पब्लिक: वर्चुअल शून्य एफ() {काउट
A
B
बी
B
A
ए
C
Compile error
संकलन त्रुटि
D
Undefined
अपरिभाषित
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English)
g() calls virtual f(): B::f()=B. Output: B.
व्याख्या (हिन्दी)
g() वर्चुअल f() को कॉल करता है: B::f()=B। आउटपुट: बी.