1.

Which among the following is false for default arguments?(a) Those are not allowed with a declaration of pointer to functions(b) Those are not allowed with the reference to functions(c) Those are not allowed with the typedef declarations(d) Those are allowed with pointer and reference to function declarationI have been asked this question in exam.My question is based upon Default Arguments topic in section Default Arguments vs Overloading, Upcasting and Downcasting of Object Oriented Programming

Answer»

Correct choice is (d) Those are allowed with pointer and reference to function declaration

Easy EXPLANATION - The statements GIVEN are true because that is a feature given to MAKE the PROGRAMMING more flexible and have some security with accidental changes at same time. The last option is false because it is not a rule defined. It is an opposite statement to the rules defined for DEFAULT arguments.



Discussion

No Comment Found

Related InterviewSolutions