Ask your own question, for FREE!
Computer Science 21 Online
OpenStudy (anonymous):

Which of the following function declaration is/are incorrect? A. int Sum(int a, int b = 2, int c = 3); B. int Sum(int a = 5, int b); C. int Sum(int a = 0, int b, int c = 3); D. Both B and C are incorrect. E. All are correct.

OpenStudy (anonymous):

Both B and C, try it on the C++ its true

OpenStudy (anonymous):

Lemme try it on

OpenStudy (anonymous):

I am sure that it will be both B n C option

OpenStudy (anonymous):

wait a min..

OpenStudy (anonymous):

yup.. its B and C

OpenStudy (anonymous):

He is correct, it is because defaults cannot precede mandatory arguments

OpenStudy (anonymous):

See... I am into Software Engg. last year n I know about C++

OpenStudy (anonymous):

Thanks

OpenStudy (anonymous):

*cannot precede mandatory arguments without defaults.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!