#include<iostream.h> void MyFunction(int a, int b = 40) { cout<< " a = "<< a << " b = " << b << endl; } int main() { MyFunction(20, 30); return 0; }
#include<iostream.h> class CuriousTabSample { public: int a; float b; void CuriousTabFunction(int a, float b, float c = 100.0f) { cout<< a % 20 + c * --b; } }; int main() { CuriousTabSample objCuriousTab; objCuriousTab.CuriousTabFunction(20, 2.000000f, 5.0f); return 0; }
#include<iostream.h> class CuriousTabArray { int array[3][3]; public: CuriousTabArray(int arr[3][3] = NULL) { if(arr != NULL) for(int i = 0; i < 3; i++) for(int j = 0; j < 3; j++) array[i][j] = i+j; } void Display(void) { for(int i = 0; i < 3; i++) for(int j = 0; j < 3; j++) cout<< array[i][j] << " "; } }; int main() { CuriousTabArray objBA; objBA.Display(); return 0; }
#include<iostream.h> void Tester(int xx, int yy = 5); class CuriousTab { int x; int y; public: void Tester(int xx, int yy = 5) { x = xx; y = yy; cout<< ++x % --y; } }; int main() { CuriousTab objCuriousTab; objCuriousTab.Tester(5, 5); return 0; }
#include<iostream.h> class CuriousTab { public: CuriousTab() { cout<< "Curious"; } ~CuriousTab() { cout<< "Tab"; } }; int main() { CuriousTab objTab; 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.