C++ Programming - Functions - Discussion

Discussion Forum : Functions - General Questions (Q.No. 5)
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
Explanation:
No answer description is available. Let's discuss.
Discussion:
30 comments Page 1 of 3.

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

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

Why? Explain with reason.
(1)

Priya said:   9 years ago
Trailing argument means?
(1)

Dipak ladani said:   1 decade ago
What is mean by trailing argument?

Answer: last argument of function is called trailing argument.
(1)

Henry said:   2 years ago
Yes, it is confusing, but basically says the default argument can't be from right to left which is A.

Srikanth said:   1 decade ago
I think the answer A is not correct.. because default arguments must start from left..

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

Please Explain.

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

Jhuma biswas said:   9 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:   10 years ago
Is it so that all arguments to be a default?


Post your comments here:

Your comments will be displayed after verification.