class Birds {}; class Peacock : protected Birds {};
#include<iostream.h> int main() { int x = 80; int &y = x; x++; cout << x << " " << --y; return 0; }
#include<iostream.h> class A { public: void CuriousTabFunction(void) { cout<< "Class A" << endl; } }; class B: public A { public: void CuriousTabFunction(void) { cout<< "Class B" << endl; } }; class C : public B { public: void CuriousTabFunction(void) { cout<< "Class C" << endl; } }; int main() { A *ptr; B objB; ptr = &objB; ptr = new C(); ptr->CuriousTabFunction(); return 0; }
Comments
There are no comments.Copyright ©CuriousTab. All rights reserved.