What is the impact of a function having a default argument? 

  • It allows function overloading. 
  • It allows multiple return types for the function. 
  • It can be called with fewer arguments than defined. 
  • It enhances runtime performance.
When a function has a default argument, it can be called with fewer arguments than it defines. The compiler will use the default value for any arguments not provided by the caller. This feature aids in providing flexibility while calling functions but doesn't directly enhance runtime performance.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *