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:
29 comments Page 2 of 3.

Trust said:   9 years 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:   9 years ago
All the arguments in function as default arguments it's not possible.

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

Dipak ladani said:   9 years ago
What is mean by trailing argument?

Answer: last argument of function is called trailing argument.

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.

Anuradha said:   10 years ago
What are trailing argument?

Panjab mane said:   10 years ago
Trailing argument start from right to left.

@Priya & Jayati.

Mayank Panchal said:   10 years 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:   10 years ago
What is mean by trailing argument?

Raji Saj said:   10 years ago
@Anurag.

You can have more than one default arguments, all these should be at the end of the argument list.


Post your comments here:

Your comments will be displayed after verification.