Curioustab
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Home
»
C++ Programming
»
Functions
Which of the following statement is correct?
Two functions having same number of argument, order and type of argument can be overloaded if both functions do not have any default argument.
Overloaded function must have default arguments.
Overloaded function must have default arguments starting from the left of argument list.
A function can be overloaded more than once.
Correct Answer:
A function can be overloaded more than once.
← Previous Question
Next Question→
More Questions from
Functions
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
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
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; }
Discussion & Comments
No comments yet. Be the first to comment!
Name:
Comment:
Post Comment
Join Discussion
Discussion & Comments