Default argument

In C++ we can call functions without specifying its all arguments.
  • A default argument is checked for type at the time of  declaration.
  • Default argument evaluated at the time of Call.
  • We must add default value of argument from Right to Left.
                     e.g
          int function(int a,int b=9,int c=3)                 //Valid
          int function(int a,int b=7,int c)                    //Invalid
          int function(int a=4,int b=9,int c)               //Invalid
          int function(int a=6,int b=9,int c=3)           //Valid



Counters