Featured

Some C++ programming Questions and Solutions

Q1: WAP to demonstrate how ambiguity is avoided in single inheritance using scope resolution operator. Ans: #include<iostream.h> Class A { public: void display() { cout<<”An”; } }; class B:public A { void display() { cout<<”Bn”; } }; int main() { B b;                      //derived class object b.display();         // invokes display() in B b.A::display();    // invokes display() …

Some C++ programming Questions and Solutions Read More »

Scroll to Top