OOCP3-4

//BCA Support //www.bcasupport.xyz #include <iostream.h> #include <conio.h> class A { public: A() { cout<<"\nObject of class A created"; } ~A() { cout<<"\nObject of class A destroyed"; } }; class B { public: B() { cout<<"\nObject of class B created"; } ~B() { cout<<"\nObject of class B destroyed"; } }; class C: public A,public B { public: C() { cout<<"\nObject of class C created"; } ~C() { cout<<"\n\nObject of class C destroyed"; } }; int main() { clrscr(); C obj; cout<<"\n\n-> Open Output screen (Alt+F5) after program execution"; getch(); return 0; }

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.