Home »
MCQs »
C++ MCQs
Which of the following condition is correct for the default arguments?
71. Which of the following condition is correct for the default arguments?
- Default arguments must be the last arguments in the function declaration.
- Default arguments must be the first argument in the function declaration.
- Default arguments can be declared anywhere in the function declaration.
- None of the above
Answer: A) Default arguments must be the last arguments in the function declaration.
Explanation:
In C++, we can create functions with default arguments. The default arguments must be the last argument in the function declaration.