#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; }
#include<iostream.h> class CuriousTab { int x, y; public: void SetValue(int &xx, int &yy) { x = xx++; y = yy; cout<< xx << " " << yy; } }; int main() { int x = 10; int &y = x; CuriousTab objCuriousTab; objCuriousTab.SetValue(x , y); return 0; }
#include<iostream.h> enum xyz { a, b, c }; int main() { int x = a, y = b, z = c; int &p = x, &q = y, &r = z; p = ++x; q = ++y; r = ++c; cout<< p << q << r; return 0; }
#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; }
Comments
There are no comments.Copyright ©CuriousTab. All rights reserved.