C++ Programming - Functions

Exercise : Functions - General Questions
6.
Which of the following statement is incorrect?
Default arguments can be provided for pointers to functions.
A function can have all its arguments as default.
Default argument cannot be provided for pointers to functions.
A default argument cannot be redefined in later declaration.
Answer: Option
Explanation:
No answer description is available. Let's discuss.

7.
Which of the following statement is correct?
Constructors can have default parameters.
Constructors cannot have default parameters.
Constructors cannot have more than one default parameter.
Constructors can have at most five default parameters.
Answer: Option
Explanation:
No answer description is available. Let's discuss.

8.
Which of the following function / type of function cannot be overloaded?
Member function
Static function
Virtual function
Both B and C
Answer: Option
Explanation:
No answer description is available. Let's discuss.

9.
Which of the following function declaration is/are incorrect?
int Sum(int a, int b = 2, int c = 3);
int Sum(int a = 5, int b);
int Sum(int a = 0, int b, int c = 3);
Both B and C are incorrect.
All are correct.
Answer: Option
Explanation:
No answer description is available. Let's discuss.

10.
Which of the following statement is incorrect?
The default value for an argument can be a global constant.
The default arguments are given in the function prototype.
Compiler uses the prototype information to build a call, not the function definition.
The default arguments are given in the function prototype and should be repeated in the function definition.
Answer: Option
Explanation:
No answer description is available. Let's discuss.