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