Curioustab
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Functions Questions
Which of the following statement is incorrect?
Which of the following statement is correct?
Which of the following function declaration is/are incorrect?
Which of the following statement is correct?
Which of the following function / type of function cannot be overloaded?
Which of the following statement is correct?
Which of the following statement is incorrect?
Which of the following statement is correct?
Which of the following statement is correct?
Which of the following statement will be correct if the function has three arguments passed to it?
Which of the following statement is correct?
Which of the following statement is correct?
Which of the following statement is incorrect?
Which of the following statement is correct?
Where the default value of parameter have to be specified?
Which of the following function prototype is perfectly acceptable?
Which of the following function / types of function cannot have default parameters?
Which of the following statement is correct about the program given below? #include<iostream.h> static int Result; class India { public: void Change(int x = 10, int y = 20, int z = 30) { cout<< x + y + z; } void Display(int x = 40, float y = 50.00) { Result = x % x; cout<< Result; } }; class CuriousTab { int x, y; public: void Change(int x, int y = 50) { cout<< x + y; } }; class CuriousTab: public India, public CuriousTab { public: void Display(int x = 10, int xx = 100, int xxx = 1000) { Result = x + xx % x * x; cout<< Result ; } }; int main() { CuriousTab objCuriousTab; objCuriousTab.India::Display(10, 20.00); return 0; }
What will be the output of the following program? #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; }
What will be the output of the following program? #include<iostream.h> class CuriousTab { public: int x, y; CuriousTab(int xx = 10, int yy = 20) { x = xx; y = yy; } void Exchange(int *, int *); }; int main() { CuriousTab objA(30, 40); CuriousTab objB(50); objA.Exchange(&objA.x, &objB.y); cout<< objA.x << " " << objB.y << endl; return 0; } void CuriousTab::Exchange(int *x, int *y) { int t; t = *x; *x = *y; *y = t ; }
1
2
3
4