Sunday, February 13, 2011

Uses of default argument


Uses of default arguments:
     Default arguments are useful in such situations where some arguments almost always have the same value. For an example: bank interest may remain the same for all customers for a particular period of deposit.
              The default arguments can be used to add new parameters to the existing functions. This increases the capability of a function by adding another argument. Using default arguments means that the existing function call can continue to use the old number of arguments, while new function calls can use more. 

No comments:

Post a Comment