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?
Discussion:
30 comments Page 2 of 3.
Mandy said:
10 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:
1 decade ago
What is trailing argument with the help of example?
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.
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
What happend if all three arguments are default arguments. Give me reply please?
Suma sree said:
1 decade ago
All the arguments in function as default arguments it's not possible.
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.
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.
@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.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers