#include<iostream.h> int main() { int m = 2, n = 6; int &x = m++; int &y = n++; m = x++; x = m++; n = y++; y = n++; cout<< m << " " << n; return 0; }
#include<iostream.h> class TestDrive { int x; public: TestDrive(int xx) { x = xx; } int DriveIt(void); }; int TestDrive::DriveIt(void) { static int value = 0; int m; m = x % 2; x = x / 2; if((x / 2)) DriveIt(); value = value + m * 10; return value; } int main() { TestDrive TD(1234); cout<< TD.DriveIt() * 10 << endl; return 0; }
#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> double CuriousTabFunction(double, double, double = 0, double = 0, double = 0); int main() { double d = 2.3; cout<< CuriousTabFunction(d, 7) << " "; cout<< CuriousTabFunction(d, 7, 6) << endl; return 0; } double CuriousTabFunction(double x, double p, double q, double r, double s) { return p +(q +(r + s * x)* x) * x; }
#include<iostream.h> int main() { int x = 10; int &y = x; x++; cout<< x << " " << y++; return 0; }
#include<iostream.h> class CuriousTabBase { int x; public: CuriousTabBase(int xx = 0) { x = xx; } void Display() { cout<< x ; } }; class CuriousTabDerived : public CuriousTabBase { int y; public: CuriousTabDerived(int yy = 0) { y = yy; } void Display() { cout<< y ; } }; int main() { CuriousTabBase objBase(10); CuriousTabBase &objRef = objBase; CuriousTabDerived objDev(20); objRef = objDev; objDev.Display(); return 0; }
#include<iostream.h> int main() { int x = 10; int &y = x; x = 25; y = 50; cout<< x << " " << --y; return 0; }
Comments
There are no comments.Copyright ©CuriousTab. All rights reserved.