1.

The default argument get bound during declaration ________________(a) And are never executed(b) And are executed simultaneously(c) But are executed only if priority is given(d) But are executed during function callI had been asked this question in class test.This is a very interesting question from Default Arguments topic in division Default Arguments vs Overloading, Upcasting and Downcasting of Object Oriented Programming

Answer»

The correct choice is (d) But are executed during FUNCTION call

For EXPLANATION: The default ARGUMENT are BOUND at the time of declaration. That is an IMPLICIT functioning. But those are executed only when the function is called. Otherwise, those will never get executed.



Discussion

No Comment Found

Related InterviewSolutions