#include<iostream.h> struct Tab { short n; }; int main() { Tab b; Tab& rb = b; b.n = 5; cout << b.n << " " << rb.n << " "; rb.n = 8; cout << b.n << " " << rb.n; 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 = z; p = ++q; q = ++p; z = ++q + p++; cout<< p << " " << q << " " << z; return 0; }
#include<iostream.h> #include<process.h> class CuriousTab { static int x; public: CuriousTab() { if(x == 1) exit(0); else x++; } void Display() { cout<< x << " "; } }; int CuriousTab::x = 0; int main() { CuriousTab objCuriousTab1; objCuriousTab1.Display(); CuriousTab objCuriousTab2; objCuriousTab2.Display(); return 0; }
#include<iostream.h> class India { public: struct CuriousTab { int x; float y; void Function(void) { y = x = (x = 4*4); y = --y * y; } void Display() { cout<< y << endl; } }B; }I; int main() { I.B.Display(); return 0; }
Comments
There are no comments.Copyright ©CuriousTab. All rights reserved.