#include<iostream.h> int x, y; class CuriousTabTest { public: CuriousTabTest(int xx = 0, int yy = 0) { x = xx; y = yy; Display(); } void Display() { cout<< x << " " << y << " "; } }; int main() { CuriousTabTest objBT(10, 20); int &rx = x; int &ry = y; ry = x; rx = y; cout<< rx--; return 0; }
#include<iostream.h> class CuriousTab { int x, y; public: CuriousTab(int xx = 10, int yy = 20 ) { x = xx; y = yy; } void Display() { cout<< x << " " << y << endl; } ~CuriousTab() { } }; int main() { CuriousTab objCuriousTab; objCuriousTab.Display(); return 0; }
class Birds {}; class Peacock : protected Birds {};
#include<iostream.h> int main() { int x = 80; int &y = x; x++; cout << x << " " << --y; return 0; }
Comments
There are no comments.Copyright ©CuriousTab. All rights reserved.