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 2 of 3.

G AKHIL said:   1 decade ago
One important point to note is that only the trailing arguments can have default value and therefore we must add defaults from right to left.

Trust said:   1 decade ago
Please help me with this question.

Write a program that declares 3 arrays of size 4 by 3 type integer your program should read the value of the two arrays, add the two array values and store the results in the third array declare another function to add two arrays and store the result in the third one.

Suma sree said:   1 decade ago
All the arguments in function as default arguments it's not possible.

Suma sree said:   1 decade ago
What happend if all three arguments are default arguments. Give me reply please?

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

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

Nitish said:   1 decade 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.

Anuradha said:   1 decade ago
What are trailing argument?

Panjab mane said:   1 decade ago
Trailing argument start from right to left.

@Priya & Jayati.

Mayank Panchal said:   1 decade ago
When you go left to right the rightest part is called trail. Trailing arguments means you should keep default arguments in the rightest position.

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


Post your comments here:

Your comments will be displayed after verification.