1.

What are default arguments?(a) Arguments which are not mandatory to be passed(b) Arguments with default value that aren’t mandatory to be passed(c) Arguments which are not passed to functions(d) Arguments which always take same data valueI got this question in final exam.My enquiry is from Default Arguments in chapter Default Arguments vs Overloading, Upcasting and Downcasting of Object Oriented Programming

Answer»

The correct answer is (b) ARGUMENTS with default VALUE that aren’t mandatory to be passed

The best EXPLANATION: The arguments which are assigned with some default value. Since some value is already GIVEN, it is not mandatory to pass those arguments. They can be used directly.



Discussion

No Comment Found

Related InterviewSolutions