In the default argument, we can assign the default values to the arguments, while calling the function if we do not provide any value for the default assigned arguments then the compiler automatically takes the default values which has been assigned to the arguments in the function definition.
In the named argument, we can specify the argument name with its value while calling the function.
Program for default and named argument in Kotlin
Output:
need an explanation for this answer? contact us directly to get an explanation for this answer