C++ Programming - Functions - Discussion

Discussion Forum : Functions - General Questions (Q.No. 9)
9.
Which of the following function declaration is/are incorrect?
int Sum(int a, int b = 2, int c = 3);
int Sum(int a = 5, int b);
int Sum(int a = 0, int b, int c = 3);
Both B and C are incorrect.
All are correct.
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
15 comments Page 2 of 2.

Abreham said:   10 years ago
What is the difference between function definition & function declaration?

Nilesh Chavan said:   9 years ago
But here we have to find the incorrect answer so b & c both are incorrect.

Hence, the correct answer is C.

Bipul said:   8 years ago
Here we have to find which are incorrect that's why option B and C are in correct. Option D is the answer. And option A is correct.

Dharmi said:   5 years ago
Why option B is incorrect?

Santosh kumar yadav said:   11 months ago
I think inc sum(int a = 0 ,int b int c =3) is the correct answer.


Post your comments here:

Your comments will be displayed after verification.