C++ Programming - Functions - Discussion

Discussion Forum : Functions - General Questions (Q.No. 5)
Which of the following statement will be correct if the function has three arguments passed to it?
The trailing argument will be the default argument.
The first argument will be the default argument.
The middle argument will be the default argument.
All the argument will be the default argument.
Answer: Option
No answer description is available. Let's discuss.
29 comments Page 1 of 3.

Nitish said:   9 years ago
Trailing argument means. In function right side argument is trailing argument.

e.g int fun (int, int, int a=4) ; int a=4 is trailing argument.

ANKIT MISTRI said:   3 years ago
Default argument must be written in rightmost side of the argument list.

Why? Explain with reason.

Sakshi said:   5 years ago
Only the trailing arguments can have default values and therefore we must add default values form right-to-left.

Riya Joshi said:   6 years ago
Why default argument must be written on the right most side of the argument list?

Please Explain.

Priya said:   7 years ago
Trailing argument means?

Abhyuday said:   7 years ago
In function we can make all arguments as default, what about that?

Jhuma biswas said:   7 years ago
By seeing different arguments I become confused which one is right answer. I can't learn anything. It became too much confusing as well as I am losing the reliability.

Abbishek Rajh said:   7 years ago
Is it so that all arguments to be a default?

Mandy said:   7 years ago
One more important point is that [D] will be also a correct answer because all arguments of a function will be default arguments.

Sonu said:   9 years ago
What is trailing argument with the help of example?

Post your comments here:

Your comments will be displayed after verification.